In this post
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
- trunkbaseddevelopment.com. Trunk Based Development.
- DORA. Capabilities: Trunk-based development. dora.dev.
IICTP is an independent technical credentialing body.