Skip to content

Instantly share code, notes, and snippets.

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 JacobWay/660c0ff1d7d2ddb2f3721ced902307d8 to your computer and use it in GitHub Desktop.
Save JacobWay/660c0ff1d7d2ddb2f3721ced902307d8 to your computer and use it in GitHub Desktop.
moving git repository to a new repository
  1. Add old remote server to the existing repository
git remote add <old-remote-server-name> <old-remote-server-address>
  1. Pull the branch of old remote server to the local
git pull <old-remote-server-name> <remote-branch-name>
  1. Push the branch to the new remote server
git push <new-remote-server-name> <local-branch-name>
  1. Remove the old remote server
git remote rm <old-remote-server-name>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment