User:Milimetric (WMF)/GitFlowGerrit

This is a page where I'm tracking what we'd like to be able to do with git flow. The big problem is that it might mess up gerrit's expectations so this is a work in progress to make sure that doesn't happen.

Working on feature Test1

And working on feature Test2 (I tried these in series but the same idea should apply in parallel)

Once done, we'd like to get a release branch and git review it.

So far so good. The tricky part starts here. If one of your commits (4 real and 2 merges) from above is rejected in Gerrit, you'll have to amend it and resubmit it. The closest we got so far is with rebase but that causes the merge commits to get lost so the gerrit patchset can't go forward. One idea would be to rebase before git review, that way the merge commits don't get pushed in the first place. This would make the reviewer's job easier.

Outside of the problem above, the other trick is figuring out what "2" is in your case. I used trial and error and just aborted the rebase if it didn't have the set of changes I wanted.

Assuming everything's ok, the last part's easy