git: having 2 push/pull repos in sync (or 1 push/pull and 1 pull in sync)

Posted by xavjuan on Stack Overflow See other posts from Stack Overflow or by xavjuan
Published on 2010-03-22T20:39:19Z Indexed on 2010/03/22 20:41 UTC
Read the original article Hit count: 299

Filed under:

Hello,

We work on multiple geographically seperate sites.

Today I have our git clones all live on one site A. Then users from site B have to ssh over to do a git clone or to push in changes. These are bare repos where the update is through pushes.

Ideally, for git clone/push performance, I'd like to limit having to go over ssh.

I'd like to have a copy of git repo X live on site A and site B... and have some syncing mechanism between them. OR to have X live on both sites, but only allow pushing to A (and have that setup correctly at clone time on B)

I'm worried about the case where someone on site A pushes changes to the repo at site A at the same time that someone on site B pushes a truely conflicting change to the repo at site B.

Is there some 'sync'ing solution built into git for distributed open repos like this?

Or a way to have a clone from X set the origin/parent to the X from the other site?

thanks,

-John

© Stack Overflow or respective owner

Related posts about git