Branching model for Git proposed by Vincent Driessen in 2010. Defines branches with fixed roles (main, develop, feature, release, hotfix) for managing structured releases.
GitFlow is a branching model that assigns specific roles to branches and defines how and when they interact. It was proposed by Vincent Driessen in 2010 and became the standard for teams with scheduled releases.
main — always reflects production code. Every commit is a release.develop — integration branch. Completed features accumulate here for the next release.feature/* — one per feature, branches from develop, merges back to developrelease/* — release preparation, branches from develop, merges to main and develophotfix/* — urgent production fix, branches from main, merges to main and developmain: ──●──────────────────●──────────●──
\ / \ / \
release: \ ──●──● \ / \
\ / \ / \
develop: ──●────●────●────●───●───●──●───●───●──
\ / \ /
feature: ●──●──● ●──●──●
# 1. Start a feature
git checkout develop
git checkout -b feature/user-auth
# ... work, make commits ...
git commit -m "feat: add login form"
git commit -m "feat: add JWT validation"
# 2. Finish the feature
git checkout develop
git merge --no-ff feature/user-auth
git branch -d feature/user-auth
# 3. Prepare release
git checkout develop
git checkout -b release/1.2.0
# ... only bug fixes and preparation ...
git commit -m "fix: typo in login page"
git commit -m "chore: bump version to 1.2.0"
# 4. Publish release
git checkout main
git merge --no-ff release/1.2.0
git tag -a v1.2.0 -m "Release 1.2.0"
git checkout develop
git merge --no-ff release/1.2.0
git branch -d release/1.2.0
# 5. Urgent hotfix
git checkout main
git checkout -b hotfix/1.2.1
git commit -m "fix: critical security vulnerability"
git checkout main
git merge --no-ff hotfix/1.2.1
git tag -a v1.2.1 -m "Hotfix 1.2.1"
git checkout develop
git merge --no-ff hotfix/1.2.1
git branch -d hotfix/1.2.1Good fit when:
Avoid when:
Simplified model: only main + feature branches. Ideal for continuous deployment.
main: ──●────●────●────●──
\ / \ /
feature: ● ●
mainmainEveryone works on main (or very short-lived branches). Requires feature flags and robust CI.
main: ──●──●──●──●──●──●──●──
main or branches that live < 1 daymain| Aspect | GitFlow | GitHub Flow | Trunk-Based |
|---|---|---|---|
| Complexity | High | Low | Low |
| Permanent branches | 2 (main, develop) | 1 (main) | 1 (main) |
| Releases | Scheduled | Continuous | Continuous |
| Ideal for | Enterprise, versioned software | SaaS, web apps | Mature teams with strong CI |
| Overhead | High | Low | Minimal |
# git-flow CLI (official extension)
brew install git-flow-avh
# Initialize in a repo
git flow init
# Use simplified commands
git flow feature start user-auth
git flow feature finish user-auth
git flow release start 1.2.0
git flow release finish 1.2.0
git flow hotfix start 1.2.1
git flow hotfix finish 1.2.1Understanding GitFlow remains relevant because many teams still use it and because its limitations teach why the industry moved toward simpler models. Knowing when GitFlow is appropriate — and when it is not — is an architectural decision that affects the delivery velocity of the entire team.
Distributed version control system created by Linus Torvalds in 2005. Foundation of every modern development workflow — from local commits to global collaboration.
Collaborative development platform built on Git. More than repository hosting — it's the central hub for code review, CI/CD, project management, and open source collaboration.
Minimalist branching model designed for continuous deployment. Only two elements — main and feature branches — with PRs as the integration point and immediate deploy after merge.