Free — no signup required

Trunk-Based Development (TBD)

2 min read

The Strategy Behind Google-Scale Engineering

Trunk-Based Development (TBD) is the strategy used by high-performing engineering organizations including Google, Meta, and Netflix. It takes the simplicity of GitHub Flow even further, prioritizing extreme integration speed and eliminating long-lived branches entirely.

In TBD, every developer commits directly to the shared trunk (the main branch) — or uses feature branches so short-lived (hours, not days) that they are merged multiple times per day. The defining characteristic is that no branch ever diverges significantly from the trunk.

Why it works:

  • No "Merge Hell": Because everyone integrates their code constantly, you never accumulate weeks of diverging changes that collide in a painful, multi-day merge session. Small, frequent merges are trivially easy to resolve.
  • True Continuous Integration: CI is not just a tool — it's a practice. TBD forces developers to actually integrate continuously, not just run a CI server on long-lived branches.
  • Faster feedback loops: Bugs introduced by one developer's change are caught within hours by the rest of the team's work, not weeks later when a feature branch finally lands.
  • Smaller diffs, better reviews: A commit that represents two hours of work is far easier to review than a PR representing two weeks of work.

The critical prerequisite: TBD requires a high-quality, fast automated test suite. If your tests take 45 minutes to run and frequently produce false failures, developers will stop running them before committing, and the model breaks down. Google's internal tooling runs targeted tests in seconds by knowing exactly which tests are affected by a given change.

Comparison with GitHub Flow: GitHub Flow allows feature branches to live for days or weeks. TBD treats any branch older than a day or two as a smell. The distinction matters at scale — a team of 5 can get away with week-long feature branches; a team of 500 cannot.

This is one of 18 chapters

Every chapter is free — Kubernetes, Terraform, SRE, distributed systems, and more — with fast daily review built in.

Sign up free