I am trying to implement a \'git-flow\' kind of workflow using Gerrit but I can\'t seem to figure out the last piece of the puzzle.
There are two preconditions to my pr
You should be able to merge the hotfix into your development branch. You don't need to merge master. We handle this with this workflow (a hotfix is considered another release and we rebase work on top of it):
https://plus.google.com/109096274754593704906/posts/R4qkeyRadLR
After considering the options I have decided to abandon this method. It seems to me that Gerrit is targeted at single integration branch development for the most part.
When changes need to be merged to two branches (eg. a hotfix that needs to go to master and develop) it makes you jump through all kinds of hoops which amount to extra work/reviewing. I've decided to stick to one branch.
I think that the Git flow model doesn't really suit in the Gerrit design. If other people have integrated Gerrit with Git flow I would love to hear about their methods.
The best solution is definitely to merge either master or the hotfix branch into your development branch. I'm not sure what your 'no merge commits' precondition is trying to solve, but it will probably create more hassle than it is worth.
On the other hand, if you do cherry pick, git will usually detect the duplicate commit during the merge and automerge it without any problems. But when there are problems they won't be fun. Also it isn't as clear which fixes have been cherry picked and which haven't, where as with a merge it is very clear.