Bitbucket to GitHub with Branches and Tags

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

Enjoy!


Posted on 2022-01-06