This document describes our Git branching workflow strategy.
Our Git workflow consists of three main flows:
- Feature Development - New features are developed in feature branches
- Release Cycle - Releases go through QA testing before deployment
- Hotfix Flow - Critical fixes can be deployed directly from main
%%{init: {
'gitGraph': {
'mainBranchName': 'main'
},
'themeVariables': {
'git0': '#4285F4',
'git1': '#34A853',
'git2': '#FBBC04',
'git3': '#9E9E9E',
'git4': '#EA4335',
'gitInv0': '#FFFFFF',
'gitInv1': '#FFFFFF',
'gitInv2': '#000000',
'gitInv3': '#FFFFFF',
'gitInv4': '#FFFFFF',
'gitBranchLabel0': '#FFFFFF',
'gitBranchLabel1': '#FFFFFF',
'gitBranchLabel2': '#000000',
'gitBranchLabel3': '#FFFFFF',
'gitBranchLabel4': '#FFFFFF'
}
}}%%
gitGraph
commit id: "Initial"
branch develop
checkout develop
commit id: "Dev work"
branch feature/new-feature
checkout feature/new-feature
commit id: "Feature work"
commit id: "More feature work"
checkout develop
merge feature/new-feature
commit id: "Feature merged"
branch release/1.0.15
checkout release/1.0.15
commit id: "Release prep"
commit id: "QA testing"
branch bugfix/issue
checkout bugfix/issue
commit id: "Fix bug"
checkout release/1.0.15
merge bugfix/issue
commit id: "Bug fixed"
checkout main
merge release/1.0.15
commit id: "v1.0.15" tag: "v1.0.15"
checkout develop
merge release/1.0.15
commit id: "Release merged back"
checkout main
branch hotfix/critical
checkout hotfix/critical
commit id: "Hotfix work"
commit id: "Testing"
checkout main
merge hotfix/critical
commit id: "v1.0.14-hotfix.1" tag: "v1.0.14-hotfix.1"
checkout develop
merge hotfix/critical
commit id: "Hotfix in develop"
develop ──────● feature/new-feature
│
▼ (work on feature)
│
▼ (PR & review)
│
develop ◄─────●
develop ──────● release/1.0.15
│
▼ (QA testing)
│
├──● bugfix/issue
│ │
◄──●
│
▼ (QA approved)
│
main ◄─────● (tag: v1.0.15)
develop ◄─────●
main ─────────● hotfix/critical
│
▼ (fix & test)
│
main ◄─────● (tag: v1.0.14-hotfix.1)
develop ◄─────●