All jobs / Engineering manager / tech lead / Code & Development Practices
Engineering manager / tech lead interview question · 3–5 years
Trunk-based development or long-lived feature branches — which do you put a team on, and why?
The strongest answer
Trunk, with small changes merged daily behind feature flags: merge pain and surprise integrations grow with branch age. Long-lived branches only where releases genuinely are versioned separately
Why it works
Right — the cost is a function of branch age, and flags are what make merging daily safe.
What a good answer covers
- Branch age is the cost.
- Merge small changes daily.
- Hide unfinished work behind flags.
- Long-lived only for versioned releases.
Answers that fall short
- Close, but not the strongest: Trunk-based, because it keeps everyone on the same code and reduces merge pain
Correct call, but the interviewer wants the mechanism: small changes, flags, and why age is the cost. - Weak: Feature branches, so that nothing unfinished can ever reach the main branch
Isolation on a branch delays integration pain rather than removing it, and flags answer the unfinished-work worry. - Red flag: Whatever the team already does; branching is a detail that does not affect delivery
Branch age drives merge cost, release risk and how often a team integrates; it is not a detail.
Who gets asked this
More Code & Development Practices questions
- The pipeline takes fifty minutes, and most of it is end-to-end tests running against a deployed environment…
- Your organisation releases once a month, in an evening, with everyone on standby. How do you get to weekly or…
- As tech lead, what is code review on your team for?
- A developer asks what the CI pipeline is actually for. What do you tell them?
- When is a story done on your team?
- Pull requests on your team sit for two or three days, and the branches grow while they wait. What do you do?
- The test suite fails on about one run in five, and the team has learned to hit “re-run”. What is your policy?
- You inherit a team with almost no automated tests. Where do you start?