Git workflow and Gerrit

后端 未结 3 1086
名媛妹妹
名媛妹妹 2021-02-13 11:10

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

相关标签:
3条回答
  • 2021-02-13 11:50

    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

    0 讨论(0)
  • 2021-02-13 12:07

    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.

    0 讨论(0)
  • 2021-02-13 12:09

    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.

    0 讨论(0)
提交回复
热议问题