Is there a recommended workflow for working with git-flow feature branches in Gerrit? Any best practices?
We are starting a project with multiple developers and a central repository managed by Git. Playing around with git-flow, I'm stuck with the problem of pushing feature branches to Gerrit as a way of backing up the developer's work while the feature is unfinished:
We do not want feature branches to be reviewed while being developed so we allow all developers to push directly to refs/heads/feature/* , circumventing the magic review branch. We would like to do the review when the feature branch is merged into the develop branch, but when the developer pushes her work to Gerrit after this merge, there's only the merge commit to review. The changes made in the feature branch do NOT appear in this patch set. I assume that's because these changes were pushed directly to refs/heads/feature/* so Gerrit thinks they do not need review anymore.
Should the developer instead push the feature branch to Gerrit right before finishing the feature branch? To be able to do this, she would need the rights to push and create references on refs/heads/feature/* and on refs/for/refs/heads/feature/*, making sure she pushes only to the review branch.
Any help will be very much appreciated.
Me and a colleague of mine has actually made a fork for git-flow with gerrit. We decided to move forward with branches called topic for differentiating access controls for regular develop and "feature/topic" branches.
Let me discuss with him Monday and get back to where we are on publishing everything to github : )
I will start removing some minor company specific items in the source and publish to github. I will start tomorrow morning Beijing time : )
Finally You can checkout this fork of git-flow https://github.com/RasmusVoss/gitflow
There is a few items that you need to read up on. https://github.com/RasmusVoss/gitflow/wiki
To see the difference between regular git-flow and this version, This version is mainly for developers working with Gerrit, we are not using any releasing features of git-flow yet.
Cheers.