Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Say I have a local dev machine, and I set the git origin to be another machine '2', is it possible to have machine2's git origin set to another machine? This would let me push my code from dev to machine2, and have machine3 as a remote backup for the repo on machine2.


share|improve this question
up vote 5 down vote accepted

Yes of course. The remote repositories are just pointers and each repository is in effect independent of the other. You don't necesarily have to have machine3 as the origin, it can just be another remote link.

Also don't forget you can have as many remote repository references as you want. git repositories aren't just set up in a straight parent/child relationship line.

You can use some of the git hooks in .git/hooks to automate this process.

share|improve this answer
awesome, thanks – Andy Sep 30 '10 at 13:39

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.