2 / 57 · 17 Git & Version Control · Branching Strategies← prev⊞ allnext →☰ Read as one page
1.2The Three Main Strategies
| Aspect | GitFlow | GitHub Flow | Trunk-Based Development |
|---|---|---|---|
| Main branches | main + develop |
main only |
main only |
| Feature branches | Branch from develop, merge back to develop |
Branch from main, merge via PR |
Short-lived branches (< 1 day), merge to main |
| Release process | release/* branch for stabilization |
Deploy from main after merge |
Deploy from main continuously |
| Hotfixes | hotfix/* branch from main |
Branch from main, merge via PR |
Fix on main directly |
| Complexity | High -- multiple long-lived branches | Low -- one main branch | Low -- but requires mature CI/CD |
| Best for | Scheduled releases, multiple versions in production | SaaS with continuous deployment | Teams with strong test automation and feature flags |