Your 40-person organisation uses GitFlow and wants to move to trunk-based development. How do you migrate?
AdvancedScenarioBranching Strategies and Releases
Answer
Situation read → This is a cultural and tooling change, not a Git command.
What I'd do →
- Prerequisites first: fast reliable CI, feature flags, and good test coverage.
- Agree the target: PRs under a day,
mainalways deployable. - Collapse
developintomain: merge it, then stop using it. - Pilot with one team, measure lead time and change failure rate, then expand.
- Keep release branches only for products with real multi-version support.
Why → Moving the branching model without CI and flags just moves the pain.
Interview tip → Frame it with DORA metrics so the benefit is measurable.
More on Branching Strategies and Releases
An eight-person team deploys several times a day. Which branching strategy do you recommend?IntermediateWhen 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?Intermediate