3 / 57 · 17 Git & Version Control · Branching Strategies← prev⊞ allnext →☰ Read as one page
1.3GitFlow in Detail
GitFlow uses two long-lived branches (main and develop) plus short-lived branches for features, releases, and hotfixes.
main ──────────────●───────────────────●──────── (production releases)
↑ ↑
release/2.3 ──────● release/2.4 ────●
↑ ↑
develop ───●──●──●─┘──●──●──●──●──●───┘──●──── (integration branch)
↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑
feature branches (short-lived)
QA Implications for GitFlow
- Test on
develop: Every feature merged todevelopshould trigger regression tests - Test again on
release/*: The release branch is for stabilization. Only bug fixes go here, and each fix needs testing - Double testing burden: You may test a feature on
developand then test the same feature again on the release branch - Hotfix testing: Hotfixes branch from
main, get tested, merge to bothmainanddevelop - Environment mapping:
developmaps to a dev/integration environment,release/*maps to staging,mainmaps to production
When to advocate for GitFlow:
- Your product has scheduled releases (quarterly, monthly)
- Multiple versions are supported simultaneously (v2.3 and v2.4 both in production)
- Regulatory requirements demand a stabilization phase before release