Trunk-Based Development vs Long-Lived Branches
You are a Engineering Manager on-call. A production issue might involve Trunk-Based Development vs Long-Lived Branches. How do you diagnose and mitigate?
Answers use simple, clear English.
Audio N/AQuick interview answer
Mitigate first, then root-cause. Check symptoms against: Week-long feature branches without syncing main..
Detailed answer
Mitigate first, then root-cause. Check symptoms against: Week-long feature branches without syncing main.. Validate with: Required checks; small PRs; flags for incomplete features.. Context: Short-lived branches merge to main frequently; feature flags hide incomplete work. Long-lived release branches increase merge pain and drift. Core: Short-lived branches merge to main frequently; feature flags hide incomplete work. Long-lived release branches increase merge pain and drift. Real-time example: Team merges daily to main; dark-launches checkout redesign behind flag. Pros: Smaller PRs; continuous integration truly continuous. Cons: Needs solid CI and flag discipline. Common mistakes: Week-long feature branches without syncing main. Best practices: Required checks; small PRs; flags for incomplete features. Audience level: Engineering Manager.
Full explanation
Short-lived branches merge to main frequently; feature flags hide incomplete work. Long-lived release branches increase merge pain and drift.
Real example & use case
Team merges daily to main; dark-launches checkout redesign behind flag.
Pros & cons
Pros: Smaller PRs; continuous integration truly continuous. Cons: Needs solid CI and flag discipline.
Common mistakes
Week-long feature branches without syncing main.
Best practices
Required checks; small PRs; flags for incomplete features.
Follow-up questions
- How would you test Trunk-Based Development vs Long-Lived Branches?
- What metrics prove Trunk-Based Development vs Long-Lived Branches is healthy in prod?
- How does Trunk-Based Development vs Long-Lived Branches change at 10× traffic?