Skip to content

Instantly share code, notes, and snippets.

@saggie
Last active March 31, 2019 00:52
Show Gist options
  • Select an option

  • Save saggie/efef4f8e02a4e677074e7b7681b802f6 to your computer and use it in GitHub Desktop.

Select an option

Save saggie/efef4f8e02a4e677074e7b7681b802f6 to your computer and use it in GitHub Desktop.
How to mirror a Git repository
# After creating an empty repository at destination site...
git clone --mirror http://__SOURCE_SITE__/path/to/repository.git
cd repository.git/
git remote add mirror1 http://__DESTINATION_SITE__/path/to/repository.git
git push mirror1 --mirror
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment