Created
January 8, 2019 16:13
-
-
Save givemelove/1292e357a14b4808e82b8ea8fe80c54a to your computer and use it in GitHub Desktop.
Instructions to migrate Bitbucket Repos to Github sequentially
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
# Pull up BitBucket and Github side by side | |
# The assumption is that you have git installed on your command line and are authenticated to both Bitbucket and Github. | |
# For Each bitbucket repo, do the following using the command line: | |
# 1 - Clones the Bitbucket repo to your working directory | |
# 2 - Change the working directory | |
# 3 - Rename the Bitbucket repo from origin to bitbucket & add the Github repo as the new Origin | |
# 4 - Push the repo to the Origin (Github), Remove the Bitbucket reference and leave the working directory | |
git clone git@bitbucket.org:<Bitbucket User>/<Repo> | |
cd <Repo> | |
git remote rename origin bitbucket && git remote add origin https://github.com/<Github User>/<Repo> | |
git push origin master && git remote rm bitbucket && cd .. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment