Pick a Strategy and Stick to It
Consistency matters more than which strategy.
GitHub Flow (Simplest)
main (always deployable)
└── feature/add-login
└── fix/broken-link
- Branch from main
- Make changes
- Open PR
- Review and merge
- Deploy main
Best for: Small teams, continuous deployment
GitFlow
main (production)
└── develop (integration)
└── feature/user-auth
└── release/1.2.0
└── hotfix/critical-bug
- Features branch from develop
- Releases branch from develop, merge to main and develop
- Hotfixes branch from main, merge to main and develop
Best for: Scheduled releases, multiple environments
Trunk-Based
main (trunk)
└── short-lived branches (hours, not days)
- Everyone commits to main (or very short branches)
- Feature flags for incomplete work
- Requires good CI/CD and tests
Best for: Experienced teams, fast deployments
Branch Naming
feature/user-authentication
fix/login-redirect-loop
hotfix/payment-crash
chore/update-dependencies
docs/api-reference
My Recommendation
Solo/Small Team: GitHub Flow
git checkout -b feature/new-thing
# work, commit
git push -u origin feature/new-thing
# PR, merge, delete branch
Larger Team: Trunk-based with feature flags, or GitFlow if you need release cycles.
