Trunk-Based Development
A source control practice where developers integrate small changes into a single shared branch, the trunk, many times a day. Feature flags let unfinished work merge safely without long-lived branches.
What it means
Trunk-based development is a workflow where everyone commits to one main branch and keeps that branch releasable at all times. Instead of maintaining feature branches that live for days or weeks, developers merge small increments frequently, often several times a day. Work that is not ready for users is hidden behind a feature flag rather than isolated on a separate branch.
Why it matters
Long-lived branches drift apart from the trunk and from each other, so merging them becomes a painful, bug-prone event. Trunk-based development avoids that by integrating constantly, which keeps merge conflicts tiny and surfaces integration problems within hours instead of weeks. It is a foundation for continuous integration and continuous delivery, and it pairs naturally with feature flags, which decouple merging code from releasing behavior. You can ship half-finished work to production, invisible and off, and turn it on when it is done.
In practice
A developer building a new checkout flow merges partial work to trunk daily, each commit wrapped in a flag that stays off in production. The team’s pipeline runs on every merge, so regressions appear immediately. When the flow is complete, they enable the flag through a gradual rollout. The trade-off is discipline around cleanup, since unmerged branches are replaced by flags that can become flag debt if left behind. Tools like LaunchDarkly and Unleash provide the gating this workflow depends on. See our trunk-based development guide for adoption steps.
Related Terms
Learn More
Tool Reviews
Free Newsletter
Get the Feature Flags Newsletter
Platform benchmarks, real pricing data and progressive delivery practice. No spam.
LaunchDarkly
Unleash