Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What is the difference between develop vs. feature branch type?

Tags:

git

git-flow

I read few articles about Git flow best practices. There are many types of git branch (for example: [1], [2]):

+ Master + Develop + Feature + Bug + Proof of concept + Release + Hotfix 

What is the difference between types Master vs. Release?

What is the difference between types Feature vs. Develop?

[1] http://nvie.com/posts/a-successful-git-branching-model/

[2] http://developer.exoplatform.org/#id-branching-model

like image 990
Do Nhu Vy Avatar asked Sep 20 '16 04:09

Do Nhu Vy


People also ask

What is a feature branch?

A feature branch is a copy of the main codebase where an individual or team of software developers can work on a new feature until it is complete. With many engineers working in the same code-base, it's important to have a strategy for how individuals work together.

What is the difference between master and develop branch?

master — this branch contains production code. All development code is merged into master in sometime. develop — this branch contains pre-production code. When the features are finished then they are merged into develop.

What is a feature branch in Git?

A feature branch is simply a separate branch in your Git repo used to implement a single feature in your project.


1 Answers

For the git workflow, as presented in [1]:

  • feature: All features / new functions / major refactorings are done in feature branches, which branch off and are merged back into the develop branch (usually after some kind of peer review).
  • release: When enough features have accumulated or the next release time frame comes near, a new release branch is branched off develop. It is solely dedicated to testing/bug fixing and any cleanup necessary (e.g. changing some path names, different default values for instrumentation etc.).
  • master Once the QA is satisfied with the quality, the release branch is merged into master (and also back to develop). This is then what is shipped/used by the customers.
  • hotfix If a major problem is found after release, the fix is developed in a hotfix branch, that is branched off the master. Those are the only branches that will ever branch off of master.
  • Note: Any commit in master is a merge commit (either from a release or a hotfix branch) and represents a new release that is shipped to the customer.

Please be aware that this model is mainly meant for a) big software projects that follow b) classic release versioning and c) have a separate QA team. Many popular repositories on GitHub follow a simpler model.

like image 123
MikeMB Avatar answered Oct 04 '22 04:10

MikeMB