tags:

views:

39

answers:

1

How to set a Git serverA and another Git serverB are synchronous? I need set 2 Git servers one is normal operation the anothers is backup. User can git clone serverA or serverB because their repository are the same.

or another backup git server method?

+2  A: 

You may want to have a post-commit script on Server A that will push all the changes to Server B.

MasterGaurav
You almost certainly mean `post-update`, since server A's repo will be pushed into, not committed directly to.
Jefromi
Also, this approach will only work if serverB is never pushed into by developers; if it is, you can have merge conflicts between the two repos and you won't be able to keep them in sync until a human resolves the conflicts. See the related question I linked in a comment to the question.
Jefromi
@Jefromi: Right. it's post-update. post-commit is in svn ;)
MasterGaurav