Skip to content

Instantly share code, notes, and snippets.

@GSuaki
Last active September 18, 2020 11:47
Show Gist options
  • Save GSuaki/7ac6abbbaeabc4f859d32eff09bef76a to your computer and use it in GitHub Desktop.
Save GSuaki/7ac6abbbaeabc4f859d32eff09bef76a to your computer and use it in GitHub Desktop.
Migrate git repository to a new one with all branchs and tags.
git clone --mirror <url_of_old_repo>
cd <name_of_old_repo>
git fetch
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