• Home
  • BVSSH
  • Engineering Enablement
  • Playbooks
  • Frameworks
  • Good Reads
Search

What are you looking for?

Practice : Trunk-Based Development

Purpose and Strategic Importance

Trunk-Based Development (TBD) is a version control strategy where all developers commit to a single shared branch - typically main or trunk - with high frequency. This practice reduces integration friction, shortens feedback loops, and encourages continuous collaboration.

TBD is essential for teams aiming to improve deployment frequency, reduce cycle time, and eliminate complex merge conflicts. It supports CI/CD by ensuring all code changes are integrated early and often, enabling faster, safer delivery of value to users.

Without TBD, long-lived feature branches and delayed merges create risks: hidden conflicts, integration bottlenecks, and last-minute surprises before release.


Description of the Standard

  • All developers commit to a single shared branch (e.g. main) multiple times per day.
  • Feature development is performed using short-lived branches (e.g. < 1 day), merged via pull requests or direct commits with tests.
  • Long-lived branches (>1 day) are strongly discouraged and require explicit justification.
  • Integration is supported by CI pipelines that validate every commit.
  • Teams use feature flags, toggles, or branch-by-abstraction to manage incomplete work in production.

How to Practise This Standard (Playbook)

1. Getting Started

  • Align the team on using a single integration branch (main, trunk, or similar).
  • Configure CI to trigger builds on every commit to trunk.
  • Set expectations: commits should be small, frequent, and shippable.
  • Use pull requests or pair programming for visibility and quality.

2. Scaling and Maturing

  • Eliminate the need for long-lived feature branches by adopting feature toggles or modular design.
  • Use pre-merge validations (e.g. linting, tests) to prevent regressions on trunk.
  • Establish social contracts: broken builds stop the line, and everyone helps fix them.
  • Visualise commit frequency and lead time to encourage good habits.

3. Team Behaviours to Encourage

  • Commit early, commit often - don’t wait until “done.”
  • Review and merge changes continuously rather than in batches.
  • Prefer small, composable changes over big-bang features.
  • Optimise for team flow, not individual perfection.

4. Watch Out For…

  • Developers working in isolation on long-lived branches.
  • Merging changes without CI validation or tests.
  • Trunk becoming unstable due to uncoordinated or unreviewed commits.
  • Resistance to changing habits - TBD can feel risky at first.

5. Signals of Success

  • Trunk is always in a deployable state.
  • Teams rarely experience merge conflicts.
  • Engineers integrate changes multiple times per day.
  • Features are released via flags, not delayed merges.
  • Everyone understands the health and purpose of trunk.
Associated Standards
  • Changes are introduced into production frequently and sustainably (DF)
  • Customer impact is the basis for all prioritisation
  • Delivery pace is sustainable and protects team wellbeing
  • Engineering lead time is minimised from start of work to safe deployment (LTFC)
  • Teams track time-in-status across their delivery flow
  • Work in progress reflects current business priorities
Associated Measures
  • Lead Time for Change
  • Code Review Cycle Time
  • Cycle Time

Technical debt is like junk food - easy now, painful later.

Awesome Blogs
  • LinkedIn Engineering
  • Github Engineering
  • Uber Engineering
  • Code as Craft
  • Medium.engineering