agile3
Engineering Practices

Trunk-Based Development

Everyone commits to one main branch at least daily, using short-lived branches or none at all.

2 min read · Practitioner

In 30 seconds

  • One main branch, always releasable.
  • Branches, if used, last a day or less.
  • Feature flags hide unfinished work.

How it works

Developers integrate into the main branch (the trunk) at least once a day. Unfinished work is hidden with feature flags or built in small, complete steps.

Why it beats long-lived branches

Long-lived branchesTrunk-based
Merge conflictsLarge, lateSmall, early
FeedbackSlowFast
Release readinessNeeds stabilizationAlways ready

What it needs

DORA research links trunk-based development with higher delivery performance.

Myth vs reality

Myth · Trunk-based means no code review.
Reality · Short-lived branches with fast reviews are common.
Myth · Unfinished features break the trunk.
Reality · Flags and small steps keep the trunk releasable.
Myth · It only works for small teams.
Reality · Large organizations use it at scale.

FAQ

How short is short-lived?

Ideally less than a day.

What about release branches?

Some teams cut them from trunk just before release.

How do we move from GitFlow?

Shorten branch life gradually and add flags.