Skip to content

Instantly share code, notes, and snippets.

@JohnathanMarkSmith
Last active December 16, 2015 15:19
Show Gist options
  • Save JohnathanMarkSmith/5454971 to your computer and use it in GitHub Desktop.
Save JohnathanMarkSmith/5454971 to your computer and use it in GitHub Desktop.
Mirroring a Git repostory
Mirroring a Git repostory
The firm I recently stated working at just moved to Git and I am the only resource then knows Git. I get asked so many times a day on how to mirror a git repostory.
From the birds eyes very its very easy:
git clone --mirror git@git.com:project project
cd project
git remote add github git@github.com:username/project.git
In cron Job
cd /pathto/project && git fetch -q && git push -q --mirror github
Thats how easy it is to mirror a Git Project on to GitHub
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment