Trunk-based development
Also known as Trunk based development, Mainline development
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.
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