Trunk-based development and small batches: what changes for release management

In brief

With trunk-based development, release branches are cut late from trunk and take only cherry-picked fixes, and the release decision moves to feature flags.

Steve Elliott

Steve Elliott · · 7 min read


On this page
  1. What does trunk-based development actually require?
  2. What is the evidence for small batches and short-lived branches?
  3. How do releases work without long-lived release branches?
  4. What do feature flags cost?
  5. What does it demand from CI, tests and code review?
  6. What changes in an illustrative 400-engineer organization?
  7. What changes for the release manager?
  8. Sources

Trunk-based development largely moves release management from merging and stabilizing branches to deciding what is switched on. Release branches, where a team still needs them, are cut from trunk a few days before a release, take only fixes made on trunk first, and are deleted afterward. The question of whether a customer sees a feature moves to feature flags.

That shift needs fast continuous integration, automated tests developers trust and quick code review, and it adds a new inventory to look after: flags. Below we read the definitions and the evidence closely, work one illustrative before-and-after, and set out what we think a release manager should own afterward.

What does trunk-based development actually require?

Two definitions are worth holding side by side. Paul Hammant's trunkbaseddevelopment.com describes a branching model where developers collaborate on one branch, trunk, and resist creating other long-lived development branches. Very small teams may commit straight to trunk. Larger teams use short-lived feature branches for code review and build checks, owned by one developer, or two when pairing, that "should only last a couple of days." With coding agents, the site counts one developer and their agents as the unit. Time spent waiting for review counts against that life.

DORA's capability page is stricter. It says developers merge into trunk at least once a day and that branches typically last no more than a few hours. Its research claim, drawn from the 2016 and 2017 State of DevOps Reports, is that teams achieve higher delivery and operational performance when they:

  • have three or fewer active branches in the repository
  • merge branches to trunk at least once a day
  • avoid code freezes and integration phases

Pull requests are allowed in both definitions. What is ruled out is a branch that outlives the change it carries.

What is the evidence for small batches and short-lived branches?

The evidence is correlational survey research plus practitioner reasoning. In our view, it points the same way on batch size.

DORA's survey work. The branch, merge and freeze findings above come from DORA's annual surveys, which find associations, not controlled effects. Summarizing DORA's 2024 report, its authors said higher AI adoption was accompanied by an estimated 1.5% decrease in delivery throughput and 7.2% reduction in delivery stability. They added that improving the development process does not automatically improve delivery without basics such as small batch sizes and testing. Their 2025 summary reported a positive relationship between AI adoption and throughput, while the relationship with stability stayed negative. DORA's small batches page now says working in small batches amplifies the positive impact of AI adoption on product performance, and warns against using AI to generate massive pull requests.

Google at scale. Rachel Potvin and Josh Levenberg's 2016 Communications of the ACM article describes trunk-based development on one repository shared by more than 25,000 developers, who committed about 16,000 changes on a typical workday. Development on branches was unusual, and long-lived branches with parallel development were "exceedingly rare."

Reinertsen's argument. In The Principles of Product Development Flow (Celeritas, 2009), Donald Reinertsen argues, among 22 batch size principles, that reducing batch size cuts cycle time and speeds feedback. He treats economic batch size as a U-curve: a trade between the cost of holding work and the transaction cost of moving a batch. That is his model, not a measurement, but it explains the practical lesson: you shrink batches by making integration, testing and deployment cheap.

How do releases work without long-lived release branches?

There are three common patterns, and the right one depends on how often you ship and how many versions you support.

PatternWhen a branch is cutWhere fixes goFits
Release from trunkNeverFixed forward on trunkTeams deploying several times a day
Branch for releaseJust in time, a few days before releaseFixed on trunk with a test, then cherry-pickedDaily to monthly releases
Long-lived release and develop branches (git-flow)At each release, kept for supportMerged between branchesExplicitly versioned software, or several versions supported at once

Hammant's site says teams with a very high release cadence cannot use release branches at all and fix forward on trunk. For branch-for-release, the rule is to reproduce a bug on trunk, fix it there with a test, then cherry-pick it to the release branch, not the reverse. Developers keep committing to trunk and do not freeze around the cut. Release branches are never merged back; in git, tag the released commit before deleting the branch. Google's practice is similar: a release is typically a snapshot of head plus a small number of cherry-picks.

Git-flow deserves a fair hearing. Vincent Driessen, who published it in 2010, added a note in March 2020 recommending a simpler workflow for continuously delivered web apps, and saying git-flow may still suit software that is explicitly versioned. In our view that is the right test.

Hidden work goes behind flags. DORA's small batches page recommends dark launching changes and using feature toggles and branch by abstraction instead of long-lived feature branches. How exposure is staged once the code is live, by audience and risk, is covered in product launch tiers.

What do feature flags cost?

Flags trade merge risk for configuration risk. Pete Hodgson's 2017 article on martinfowler.com sorts them into release, experiment, ops and permissioning toggles. Release toggles are transitional and should generally go within a week or two; permissioning toggles can live for years. He describes flags as inventory with a carrying cost and lists controls: a removal task created with each release toggle, expiration dates, tests that fail once a flag expires, and a cap on how many flags may exist.

The cost of skipping those controls is on the public record. The SEC's 2013 order against Knight Capital found that new code deployed for a retail liquidity program repurposed a flag once used to activate Power Peg, functionality unused since 2003 but left on production servers. One of eight servers did not receive the new code. In about 45 minutes on August 1, 2012, the system sent millions of orders and Knight realized a $460 million loss. That was not a branching failure, but in our view it is the clearest argument for treating dead flags and dead code as release risk.

What does it demand from CI, tests and code review?

DORA's trunk-based page names the prerequisites: a build kept green, with broken commits fixed or reverted at once; tests run before commit; comprehensive automated tests enforced through branch protection; and builds and tests that finish in a few minutes. It names two review pitfalls. Multi-approval processes push developers toward large batches, and asynchronous review lengthens merge delays and raises conflict risk.

Code review speed is achievable at scale. In Sadowski and colleagues' ICSE 2018 study of 9 million reviewed changes at Google, the median change modified 24 lines, the median change had one reviewer, and median latency for the whole review process was under 4 hours. For small changes, the median wait for first feedback was under an hour.

What changes in an illustrative 400-engineer organization?

Take an illustrative engineering organization of 400 engineers in 50 teams running 120 services. The numbers are assumptions, not measurements.

MeasureBefore: monthly trainAfter: trunk-based
Feature branch life (median)8 working daysUnder 1 working day
Merges to trunk per month8008,000
Merges needing manual conflict work30%, about 3 hours each3%, about 20 minutes each
Engineer-hours on conflicts per month72080
Code freeze per release5 working daysNone
Change lead time (median)About 23 working daysAbout 1 working day

Before, a change waits 8 days on its branch, about 10 days on average for the next monthly cut, then 5 days of stabilization. After, it waits under a day to merge and deploys with the next daily release. At an illustrative loaded cost of $100 an hour, the 640 conflict hours saved are worth $64,000 a month, before counting faster feedback.

DORA defines change lead time from commit to version control to deployment in production, but it does not say which commit when work starts on a branch. If the before-state counts from the merge to trunk, its lead time falls from about 23 to about 15 working days, and the 8 days on the branch disappear. In our view, read "committed" as the first commit on any branch, not the merge to trunk. Gaming risks are covered in DORA metrics without gaming.

What changes for the release manager?

In our view, release management becomes policy ownership rather than merge coordination:

  1. Branch policy. Publish a maximum branch age and report breaches, using DORA's findings on three or fewer active branches and daily merges as the guide.
  2. Cherry-pick policy. Fix on trunk first, keep a test with every fix, and tag before deleting a release branch.
  3. Flag inventory. Keep an owner, category and expiry date for every flag, and report flags past expiry.
  4. Release evidence. Let the pipeline record tests, reviews and flag changes, so change approval can rest on automated controls. That trade is covered in change advisory boards vs automated controls.

We think the flag inventory is most useful when each flag records the funded initiative it serves, so switching it on can be traced from the work back to the portfolio decision that paid for it.

Sources

Frequently asked questions

Does trunk-based development mean no branches at all?

No. Hammant's trunkbaseddevelopment.com allows short-lived feature branches owned by one developer that last a couple of days at most, and DORA describes branches lasting a few hours with merges to trunk at least daily. Release branches are also allowed if cut late from trunk. What trunk-based development rules out is long-lived branches carrying parallel development.

How are bugs fixed on a release branch under trunk-based development?

Fix on trunk first. Hammant's site says to reproduce the bug on trunk, fix it there with a test, then cherry-pick the fix to the release branch, not the reverse, which risks regressions in the next release. Release branches are not merged back to trunk; in git, tag the released commit before deleting the branch.

Is git-flow wrong?

Not for every team. Vincent Driessen, who published git-flow in 2010, added a note in March 2020 recommending a simpler workflow for continuously delivered web apps, and saying git-flow may still fit software that is explicitly versioned, or that must support several versions in the field. In our view, release cadence and the number of supported versions should decide.

What is the main risk of relying on feature flags?

Flags left in place. Pete Hodgson describes flags as inventory with a carrying cost and recommends expiry dates, removal tasks and a cap on flag count. The SEC's 2013 order on Knight Capital found that a repurposed flag activated old, unused code on one server, and the firm realized a $460 million loss in about 45 minutes.

Free starter pack

Launch a product operating model, step by step.

Get the starter pack
Steve Elliott

Steve Elliott

Published December 1, 2026

More on Delivery & Engineering Ops

SAFe, flow metrics, DORA metrics.