Last active
January 19, 2019 06:22
-
-
Save appwiz/03bfe9b1fa7eb325a20a8a911b154f1c to your computer and use it in GitHub Desktop.
Moving a repository from BitBucket to GitHub
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# needs hub installed via brew install hub | |
# hub will prompt for github credentials once with optional mfa | |
# https://help.github.com/articles/importing-a-git-repository-using-the-command-line/ | |
BITBUCKET_USERNAME=<> | |
GITHUB_USERNAME=<> | |
REPOSITORY_NAME=<> | |
git clone --bare git@bitbucket.org:$BITBUCKET_USERNAME/$REPOSITORY_NAME.git | |
cd $REPOSITORY_NAME | |
hub create -p | |
git push --mirror git@github.com:$GITHUB_USERNAME/$REPOSITORY_NAME.git |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment