Reputation: 97717
In order to have make sure all code eventually goes through pull request code review, we've started creating branches for features and bug branches off of develop following the git-flow style.
The only problem is that once a bug is found in a release branch, we often have to make a branch off of the release branch in order to do a pull request back to the release branch. But there doesn't seem to be an obvious git-flow process for handling branches off of the release branch when bug fixing a release branch.
What is the git-flow process for fixing release branch bugs and code review?
Are you supposed to fix the bug in develop and create a new release branch? Is branching off of a release branch still valid git-flow? What's the best way to handle pull request code reviews on release branch bug fixes?
Upvotes: 8
Views: 4927
Reputation: 133
I just came accross this same issue. I suggest creating a normal branch from the release branch. Make your fixes there and create a pull request for that branch to be merged to the release branch. This is using the normal branch and merge commands and not the Git Flow commands.
Step details below:
Hopefully that will work better. Lots of steps and brakes from the Git-flow command set but should allow the pull requests to happen.
Upvotes: 4
Reputation: 51150
Bug fix branches should be branched off master (or whatever branch represents your production code). If you're using git flow, this sometimes means you have to cherry pick commits into the bug fix branch if you've already made the code change in a branch off of develop.
Upvotes: 0
Reputation: 4821
The way I handle it would be to have a hotfix branch off the release branch. After fixing the bug I would merge in to master/release branch and also merge to Dev
branch which would then trickle down to the other features.
The hotfix would then be deleted because it'll be recorded in master
or dev
.
Upvotes: 1