Glossary

Trunk-Based Development

Trunk-based development is a branching model in which developers merge small changes into one shared main branch at least once a day.

Trunk-Based Development

What Is Trunk-Based Development?

Trunk-based development is a source control branching model in which all developers merge small changes into one shared branch, the trunk or main branch, at least once a day. Branches, when used, live for hours or a day or two. The trunk is kept in a releasable state at all times.

Why Trunk-Based Development Matters

A feature branch that lives for three weeks diverges from everyone else's work. When it is finally merged, the conflicts are large and the combined code has never been tested together. With trunk-based development each merge contains a few hours of work, so conflicts are small and integration problems appear the same day. DORA research identifies it as a practice that predicts higher software delivery performance.

How Trunk-Based Development Works

  • Developers pull the latest trunk, make a small change and merge it back the same day, directly or through a short-lived pull request.
  • An automated build and test suite runs on every merge. A broken trunk is fixed or reverted immediately.
  • Unfinished features are merged behind feature flags, so the code is integrated but inactive for users.
  • Releases are cut from the trunk, either straight from a commit or from a short-lived release branch.

The model depends on fast, reliable automated tests. It covers the coding and integration stages of the software delivery lifecycle and is a precondition for continuous delivery.

Trunk-Based Development vs Gitflow

Gitflow uses long-lived develop, feature, release and hotfix branches, and work is integrated when a feature is complete. Trunk-based development has one long-lived branch and integrates continuously. Gitflow suits software with several supported versions; trunk-based development suits services that are deployed continuously.

How Oobeya Uses Trunk-Based Development

Oobeya shows the effects of a branching model per repository under Coding, Review & Delivery. The Pull Requests tab reports PR size, cycle time and time to merge, which stay low when branches are short-lived. The Deployments (DORA) tab shows lead time for changes and deployment frequency. The Symptoms catalog flags oversize pull requests, a typical sign of long-lived branches.

Frequently Asked Questions

Does trunk-based development mean no branches at all?

No. Small teams sometimes commit directly to the trunk, but most teams use short-lived branches with a quick review. The rule is that a branch is merged within a day or two.

How is unfinished work kept away from users?

Unfinished code is wrapped in feature flags or left unreachable from the user interface. It is merged and tested with everything else but stays switched off until it is ready.

Does trunk-based development require continuous integration?

Yes. Merging many times a day is safe only when every merge is built and tested automatically and failures are fixed at once.

Related Pages

Move from definition to product context with the most relevant Oobeya pages for this term.

Turn Engineering Terms Into Actionable Visibility
Move from definitions to real delivery, quality, workflow, and AI-assisted development signals.
Talk to our experts and see how Oobeya connects the metrics behind your engineering organization.