Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to do add a fix in the release branch using git flow / hubflow

In our project we are following repo model as per http://nvie.com/posts/a-successful-git-branching-model/ .

I had been adding features into the develop branch until now, however now our project has created a release branch and I need to add a fix on that release branch. From what I have read , adding a hotfix will add the fix to my master branch and not the release branch. So how do I add a fix on my release branch ?

like image 655
jay Avatar asked Jul 10 '14 06:07

jay


People also ask

What is release branch in git flow?

The release branch represents a complete feature set. The only commits on the release branch are for bug fixes and important chores. The Gitflow release branch is created off the development branch. Gitflow release is merged into master and also back into development.

How do I create a hotfix in git?

Create a hotfix branch from master , add the new field and deploy to a Test Environment. This hotfix can wait months until merge with master, because after test pass we need wait the Product Owner say that can go to production because this field depends on another system changes.

How do I create a git release candidate?

Creating a Release CandidateMerge any and all other branches that are being considered for the release, preferring integration branches. (Infrastructure branches should not be directly merged for release candidates, as they are not related to business needs; instead, merge the features that include them.)


1 Answers

One of the major points of release branches is to allow for minor bug fixes. So while the release branch is active, you can make fixes directly on the release branch.

After the release branch is finished, i.e. the release has been made, it is merged to master. After that commits should no longer be added to the release branch. Rather, urgent bugfixes done after a release are hotfixes, and should be merged to master. (Non-urgent bugfixes can be created as features, merged to the develop branch and released later)

Conceptually the release branch is "dead" after the release has been made. Only master and develop branches live on continuously.

You are of course free to have a different process, but then you are not strictly following the git-flow model.

like image 198
Klas Mellbourn Avatar answered Oct 07 '22 23:10

Klas Mellbourn