Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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.

Thanks

share|improve this question

1 Answer 1

up vote 2 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

 
discard

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