Skip to content

Instantly share code, notes, and snippets.

@previtus
Last active April 20, 2020 20:51
Show Gist options
  • Save previtus/c00b549abc72de65848214cbe758bff4 to your computer and use it in GitHub Desktop.
Save previtus/c00b549abc72de65848214cbe758bff4 to your computer and use it in GitHub Desktop.
Migration of git repositories (copy to another one with history)
# New remote
git remote add newremote https://github.com/user/repo.git
git push newremote master
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