ef-labs / stash-hook-mirror

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

Sync Back to Bitbucket ? #86

Open regicsolutions opened 3 years ago

regicsolutions commented 3 years ago

I have this working where I am able to mirror my Bitbucket repo to CodeCommit and was wondering if there is a way this plugin can support pulling changes from the remote/upstream repo as well, basically looking to do a git pull —all at the same time…

adrianluisgonzalez commented 3 years ago

Not really, it expects the mirror to be readonly. It works as a bitbucket PostRepositoryHook to push changes immediately after commits. By default it pushes refs/heads/* (plus optionally tags and notes).

I suppose you could try a PreRepositoryHook to pull changes before the commit, but I think that would lead to conflict resolution problems.