An eight-person team deploys several times a day. Which branching strategy do you recommend?
IntermediateScenarioBranching Strategies and Releases
Answer
Situation read → High deploy frequency favours short feedback loops and small integrations.
What I'd do →
- Trunk-based development: short-lived branches (under two days) merged to
mainthrough PRs. - Every merge to
mainmust be deployable; CI gates it. - Hide unfinished work behind feature flags.
- Cut release branches or tags only when a release needs stabilising.
Why → Long-lived branches hide integration pain until late. Trunk-based moves that pain to every day when it is small.
Interview tip → DORA research links trunk-based development and frequent small merges with better delivery performance.
More on Branching Strategies and Releases
When would you choose GitFlow over trunk-based development?IntermediateIn trunk-based development, a feature will take three weeks. How do you merge it daily without exposing it?IntermediateYou are cutting a release. How do you manage the release branch and late fixes?IntermediateShould releases use lightweight or annotated tags?BeginnerA release tag was placed on the wrong commit and has been published. What do you do?IntermediateProduction has a bug, but `main` already contains unreleased features. How do you ship a hotfix?Intermediate