Skip to content

Instantly share code, notes, and snippets.

@juanformoso
Created December 17, 2014 21:16
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 juanformoso/90103e83b24a66196a77 to your computer and use it in GitHub Desktop.
Save juanformoso/90103e83b24a66196a77 to your computer and use it in GitHub Desktop.
How to migrate git from one server to another
Assuming you use origin as the name of your remote
git pull
git remote rm origin
git remote add origin [new_url]
git push -f --tags origin refs/heads/*:refs/heads/*
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment