5 / 57 · 17 Git & Version Control · Branching Strategies← prev⊞ allnext →☰ Read as one page
1.5Trunk-Based Development in Detail
Trunk-based development takes GitHub Flow to its extreme. Feature branches live less than a day. Developers commit to main frequently, often multiple times per day.
main ──●●●●●●●●●●●●●●●●●●●●●● (continuous stream of small commits)
↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑
Very short-lived branches (hours, not days)
QA Implications for Trunk-Based Development
- Every commit must pass all tests: There is no stabilization period. The pipeline must be fast and reliable.
- Feature flags replace feature branches: Incomplete features are deployed behind flags, not on separate branches
- Testing shifts left dramatically: QA reviews requirements and writes tests before development starts, because there is no time to catch up later
- Flaky tests are existential threats: A flaky test that blocks
mainblocks the entire team. Fix flaky tests immediately.
When trunk-based development works:
- The team has high test automation maturity (>90% of tests automated)
- CI pipeline completes in under 10 minutes
- Feature flags are available and well-managed
- The team has strong code review discipline