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?
Updated on: 6/17/2022. Git flow is a popular Git branching strategy aimed at simplifying release management, and was introduced by software developer Vincent Driessen in 2010. Fundamentally, Git flow involves isolating your work into different types of Git branches.
The release branch helps isolate the development of an upcoming version and the current release. The release branch's lifetime ends when a particular version of a project is released. Once this branch merges into the develop and main branches, it can be deleted.
The two primary branches in Git flow are main and develop. There are three types of supporting branches with different intended purposes: feature, release, and hotfix.
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.
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
.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With