Reputation: 2191
For a project exisitng in github.com private repository, I am setting up gerrit code review.
I am using the gerrit's replication plugin to keep the gerrit repository in sync with github.com.
But if someone commits (say commit-a
) and pushes directly to github.com, the commit-a
is overwritten in github.com, when gerrit does the replication process (because, it replicates only the things in gerrit mirror).
But I want to implement a 2-way sync. Something like, whenever a push is made to gerrit, it has to check github.com and update its mirror with new code from there and then to continue the merge.
Is that possible?
Upvotes: 2
Views: 1879
Reputation: 37620
It might not be the direct answer to your question, but if you would make Gerrit your source of truth and you only care about pull requests, you can use the github plugin to import the PR into a Gerrit change.
This wouldn't help, of course, if anybody pushes commits directly to Github.
In general, I agree with Magnus Bäck.
Upvotes: 1
Reputation: 11571
This is a hard problem. Multi-master setups like what you describe exist in many places, but rely on the involved systems to be heavily integrated and built to support this.
I see two options:
Upvotes: 4