Canonical: https://weaveos.com/glossary/trunk-based-development

[Home](https://weaveos.com/)/[Glossary](https://weaveos.com/glossary)/[DORA and DevOps](https://weaveos.com/glossary/category/dora-devops)/Trunk-based development

[DORA and DevOps](https://weaveos.com/glossary/category/dora-devops)

# Trunk-based development

Also known as Trunk based development, Mainline development

By WeavePublished September 10, 20261 min read

## Definition

Trunk-based development is a version control practice where developers integrate small changes into a shared main branch frequently. Short-lived branches and feature flags can keep incomplete work safe while reducing long-lived merge divergence.

On this page

1. [Definition](https://weaveos.com/glossary/trunk-based-development#definition)
2. [How it works](https://weaveos.com/glossary/trunk-based-development#article-how-it-works)
3. [Why teams use it](https://weaveos.com/glossary/trunk-based-development#article-why-teams-use-it)
4. [Conditions for success](https://weaveos.com/glossary/trunk-based-development#article-conditions-for-success)
5. [Measure the outcome](https://weaveos.com/glossary/trunk-based-development#article-measure-the-outcome)
6. [How this relates to Weave](https://weaveos.com/glossary/trunk-based-development#weave)
7. [Sources](https://weaveos.com/glossary/trunk-based-development#sources)
8. [Related terms](https://weaveos.com/glossary/trunk-based-development#related)

## How it works

Developers keep branches short and integrate with the main branch at least daily, often more frequently. Automated tests and build checks provide fast feedback. Incomplete behavior can stay behind a feature flag until it is ready for users.

## Why teams use it

Long-lived branches accumulate conflicting changes and delay feedback. Small integrations reduce the size of each merge and make it easier to identify which change caused a failure. Trunk-based development also gives deployment systems a steadier stream of reviewable work.

## Conditions for success

The practice depends on reliable automation, clear ownership, and a safe rollback path. If the main branch is frequently broken, pushing more often increases frustration. Teams should improve test signal and recovery before making integration frequency a target.

## Measure the outcome

Track change lead time, deployment frequency, failure rate, and recovery alongside branch patterns. Weave can connect those delivery measures to pull request size and review behavior, helping teams learn whether trunk-based development improved flow for their actual system.

## How this relates to Weave

Weave helps teams see whether smaller, frequent changes are moving through review and deployment smoothly. That evidence can support a trunk-based development rollout without treating branch counts as a success metric by themselves.

[Explore Engineering intelligence](https://weaveos.com/products/engineering-intelligence)

## Sources and further reading

1. [Trunk-based development, DORA](https://dora.dev/devops-capabilities/technical/trunk-based-development/)

## Related terms

### [Continuous integration](https://weaveos.com/glossary/continuous-integration)

[What continuous integration means, what a useful CI pipeline checks, and how fast feedback supports delivery.](https://weaveos.com/glossary/continuous-integration)

### [Feature flags](https://weaveos.com/glossary/feature-flags)

[How feature flags separate code deployment from user release, with guidance for safe use and cleanup.](https://weaveos.com/glossary/feature-flags)

### [Deployment frequency](https://weaveos.com/glossary/deployment-frequency)

[How to measure deployment frequency, define a production deployment, and interpret changes without treating releases as units of value.](https://weaveos.com/glossary/deployment-frequency)

### [Change lead time](https://weaveos.com/glossary/change-lead-time)

[What change lead time measures, where its clock starts and stops, and how it differs from ticket lead time or pull request cycle time.](https://weaveos.com/glossary/change-lead-time)
