IICTPIICTP

Blog / Guides

Answers1 November 20264 min read

What is trunk-based development?

Trunk-based development is a way of working in which developers merge small changes into one shared main branch, the trunk, at least daily. Branches, if used at all, last hours or a day or two, which keeps integration problems small.

In this post
  1. How is it different from long-lived feature branches?
  2. How do you ship unfinished work?
  3. What does it require?
  4. How does release work?
  5. Who benefits and who struggles?
  6. Sources and further reading

How is it different from long-lived feature branches?

With long-lived branches, work diverges for weeks and the merge is large, risky and full of conflicts. With trunk-based work, everyone integrates continuously, so the code on the trunk is always close to what everyone is working on.

How do you ship unfinished work?

You hide it behind a feature flag or build it so that it is not yet reachable. The code is merged and deployed, but users do not see it until the flag is turned on, which separates deploying from releasing.

What does it require?

A fast automated test suite, because every merge must be checked quickly, and a team habit of keeping the trunk working. Small changes, good review turnaround and a rule that a broken trunk is fixed first are all part of it.

How does release work?

Releases are cut from the trunk, or from a short-lived release branch for stabilising a version. Hotfixes are made on the trunk and brought to the release, which avoids many parallel branches to maintain.

Who benefits and who struggles?

Teams that want fast, frequent releases benefit most, and research on delivery performance links it to better outcomes. Teams with weak automated testing struggle until they build it, so improve the tests first.

Sources and further reading

  1. trunkbaseddevelopment.com. Trunk Based Development.
  2. DORA. Capabilities: Trunk-based development. dora.dev.

IICTP is an independent technical credentialing body.

Keep reading

← All posts

Where do you stand?

Find the credential that fits the work you do.