GitFlow

GitFlow Branching Strategy

GitFlow is a robust branching model designed for scheduled releases and large-scale projects. it provides a strict branching structure that helps manage features, hotfixes, and releases with precision.

Core Branches

Main (Master)

The main branch stores the official release history. All code in this branch is production-ready and tagged with version numbers.

Develop

The develop branch serves as an integration branch for features. It contains the latest delivered development changes for the next release.

Supporting Branches

Feature Branches

Used to develop new features for the upcoming or a distant future release.

  • Branch off from: develop
  • Merge back into: develop

Release Branches

Support preparation of a new production release. They allow for last-minute "polishing" (minor bug fixes and preparing meta-data).

  • Branch off from: develop
  • Merge back into: main and develop

Hotfix Branches

Used to quickly patch production releases. These are the only branches that branch off directly from main.

  • Branch off from: main
  • Merge back into: main and develop

Visual Flow

GitFlow Diagram


Following this strategy ensures that the main branch is always stable, while allowing multiple features to be developed in parallel without interference.