Gitflow Branching Strategy
Published on: 08 September 2025
Tags: #gitflow #branching-strategy
graph LR
%% Core Branches
MainBranch["MainBranch
prod stable branch"]
DevelopBranch["DevelopBranch
Branch for development"]
%% Feature Branches
FeatureBranch1["FeatureBranch1
Branch for feature 1"]
FeatureBranch2["FeatureBranch2
Branch for feature 2"]
%% Release & Maintenance Branches
ReleaseBranch["ReleaseBranch
Final testing"]
HotfixBranch["HotfixBranch
Created for urgent fix"]
%% --- Connections ---
%% Feature workflow
DevelopBranch -- "Create branch for feature 1
Test in local
Raise PR" --> FeatureBranch1
FeatureBranch1 -- "Merge after review" --> DevelopBranch
DevelopBranch -- "Create branch for feature 2
Test in local
Raise PR" --> FeatureBranch2
FeatureBranch2 -- "Merge after review" --> DevelopBranch
%% Release workflow
DevelopBranch -- "Create on release-ready" --> ReleaseBranch
ReleaseBranch -- "Merge after testing" --> MainBranch
ReleaseBranch -- "Merge after testing" --> DevelopBranch
%% Hotfix workflow
MainBranch -- "Create branch for urgent fix" --> HotfixBranch
HotfixBranch -- "Merge to main" --> MainBranch
HotfixBranch -- "Merge to develop" --> DevelopBranch