Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Gitflow feature vs bugfix branch naming [closed]

While using Gitflow, what is the reason for separating branch naming to feature vs bugfix vs hotfix?

I.e. why not just, for example, instead of:

feature/ bugfix/ hotfix/ 

Just do:

change/ 

What does separating by feature/bugfix/hotfix buy?

like image 720
Pavel Chernikov Avatar asked Jun 29 '15 21:06

Pavel Chernikov


People also ask

What is the difference between feature branch and release branch?

A release branch is created from develop. Feature branches are created from develop. When a feature is complete it is merged into the develop branch. When the release branch is done it is merged into develop and main.

When a programmer using GitFlow begins a new feature which branch do they create a branch from?

The Gitflow release branch is created off the development branch. Gitflow release is merged into master and also back into development.

What is bugfix branch in git?

There's no such thing as “the” bugfix branch. It's common practice for a developer to create a branch whenever they're working on anything that they expect to result in a commit. That might be developing a new feature (this is often called a “feature branch”) or fixing a bug (a “bugfix branch”).

What is GitFlow branching?

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.


1 Answers

Great questions and the answer really depends on how you sort your git. The branching model and gitflow in general is trying to give us some order in the chaos that commits are just after a couple of days.

The image below shows you what they though makes most sense.

(As far as I know it all came from this blog post by Vincent Driessen)

Separating your hotfixes which merge directly into master and your bugfixes which merge into dev makes it easier to go with your product cycle.

The idea is you build your app, create features, make a release candidate (beta test) and then release your app. Hotfixs can be necessary at any time after this. No point in going back all the way to the feature branch and issuing a bug fix there as the feature may already been developed further.

Does that make sense?

enter image description here

like image 194
Dominik Avatar answered Sep 17 '22 15:09

Dominik