Last active
April 20, 2020 20:51
-
-
Save previtus/c00b549abc72de65848214cbe758bff4 to your computer and use it in GitHub Desktop.
Migration of git repositories (copy to another one with history)
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
# New remote | |
git remote add newremote https://github.com/user/repo.git | |
git push newremote master |
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
git clone --mirror OLDURL | |
cd OLDURL.git | |
git remote add new-remote NEWURL | |
git push new-remote --mirror | |
(then test with) | |
cd .. | |
git clone NEWURL |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment