Created
August 14, 2013 15:06
-
-
Save cmcculloh/6231934 to your computer and use it in GitHub Desktop.
Migrate from one remote to another for a given repo
This file contains hidden or 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
# replace <repo> with the name of the repository to be migrated | |
# replace <remote-from-url> with the url of the repository to be migrated from | |
# replace <remote-to-url> with the url of the repository to be migrated to | |
git init --bare temp<repo> | |
cd temp<repo> | |
git remote add from <remote-from-url>/<repo>.git | |
git remote add to <remote-to-url>/<repo>.git | |
git fetch from 'refs/*:refs/*' | |
git push to 'refs/*:refs/*' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment