What is Git Branching Strategy ?

Nirbhay Singh
2 min readJan 12, 2023

Git branching is a feature in Git that allows multiple developers to work on the same codebase simultaneously without interfering with each other’s work.

A common branching strategy used in Git is called “Gitflow.” This strategy involves several different branches to organize the development process:

  • master: This is the main branch that contains the production-ready code. It should always be in a stable state.
  • develop: This branch is used to integrate changes from feature branches and is the main branch where development takes place.
  • feature: These branches are used to develop new features. They are created from the develop branch and are merged back into develop when the feature is complete.
  • release: These branches are used to prepare for a release. They are created from the develop branch and are used to make last-minute changes and bug fixes. Once the release is ready, the release branch is merged into master and develop.
  • hotfix: These branches are used to make critical bug fixes to the master branch. They are created from master and are merged back into master and develop once the fix is complete.

With this branching strategy, developers can work on new features and bug fixes without interfering with the production-ready code in the master branch. The develop branch serves as the integration point for all changes, and the feature, release, and hotfix branches provide a way to organize the development process and prepare for releases.

It’s important to note that this is just one example of a Git branching strategy, and different teams may use different strategies depending on their needs and workflow.

Good Luck!

--

--

Nirbhay Singh

Technophile, DevOps Consultant at Deloitte, talks about DevOps, Cloud, Site Reliability Engineer, Linux and Programming.