- Create a new folder for the fresh repo clones. Navigate inside.
mkdir temp/
cd temp/
- Clone the repo using the following command.
git clone --mirror git@bitbucket.com:org/name.git
- Navigate into the locally cloned repo.
cd name.git/
- Set the new remote
git remote set-url --push origin git@github.com:org/name.git
- Push the contents of the repo to the new remote.
git push --mirror
Enjoy!