ef-labs / stash-hook-mirror

An Atlassian Stash repository hook for mirroring to one or more remote git repositories.
MIT License
76 stars 59 forks source link

Two-way replication #48

Open Hehohehoheho opened 7 years ago

Hehohehoheho commented 7 years ago

Can this plugin do two-way replication between two Bitbucket Server instances?

We would like to make commits/pull-requests in either repository.

adrianluisgonzalez commented 7 years ago

No, it is just a one way mirror.

Hehohehoheho commented 7 years ago

Could the two-way replication work if both servers have the same plugin installed?

adrianluisgonzalez commented 7 years ago

You're welcome to try, but you will have unpredictable behavior if two people commit at the same time. Someone is going to have their changes overwritten.

mbadawi23 commented 7 years ago

I have this plug in installed on two repos to have two-way mirror. The --prune and the use of force flag (+) is a little scary, but in the case of two pushes at the same time, wouldn't at least one user get a failed push?