Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
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