Skip to content

Instantly share code, notes, and snippets.

@sadikaya
Created November 20, 2016 10:47
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save sadikaya/683528ec8d6ffeefefc1815a1677b5cb to your computer and use it in GitHub Desktop.
Save sadikaya/683528ec8d6ffeefefc1815a1677b5cb to your computer and use it in GitHub Desktop.
Mirror git repository, good for backup or migration
git clone --mirror <url_of_old_repo>
cd <name_of_old_repo>
git remote add new-origin <url_of_new_repo>
git push new-origin --mirror
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment