Skip to content

Instantly share code, notes, and snippets.

@coreyward
Created April 22, 2011 22:56
Show Gist options
  • Save coreyward/937889 to your computer and use it in GitHub Desktop.
Save coreyward/937889 to your computer and use it in GitHub Desktop.
Quickly add a git remote mirror
# because I always forget the magic sequence of commands…
ssh host 'git init --bare /var/src/repo.git'
git remote add mirror --mirror host/var/src/repo.git
git push mirror # tada
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment