Is there a gitflow process for branching and bug fixes with a release branch?
git, git-flow, pull-request
Solution
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:
- checkout the release/2017.05.24 branch. Where 2017.05.24 is the name of the release branch.
- Execute the branch command and name it “release2017.05.24 - reason for fix”. This will make it obvious why the branch exists (for release fix).
- Make your changes, commit, push your changes up to the server (push your branch to origin).
- In your server create a pull request for your branch to merge to the release/2017.05.24 branch. NOTE: merging to release/2017.05.24 branch is NOT the default so be sure to change that before creating the pull request.
- On code review approval checkout “release/2017.05.24”
- Execute the merge command picking your commit in “release2017.05.24 -reason for fix” branch.
- Delete the local and remote branches for your “release2017.05.24 - reason for fix” branch
Hopefully that will work better. Lots of steps and brakes from the Git-flow command set but should allow the pull requests to happen.
Problem
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?