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 xthiago/617e8d189cb4cf2cc2343c69113a3fe6 to your computer and use it in GitHub Desktop.
Save xthiago/617e8d189cb4cf2cc2343c69113a3fe6 to your computer and use it in GitHub Desktop.
Moving git repository and all its branches, tags to a new remote repository keeping commits history

Moving git repository and all its branches, tags to a new remote repository keeping commits history

git clone --mirror ORIGINAL-REPOSITORY-URL DIRECTORY-NAME
cd DIRECTORY-NAME
git remote add NEW-REMOTE NEW-REPOSITORY-URL
git push  NEW-REMOTE --mirror
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment