Trunk-based development

Also called: TBD

Last updated:

Trunk-based development is a source-control practice in which developers integrate to one shared branch — the trunk, often main — in small, frequent commits, rather than working on long-lived feature branches that merge weeks later. The trunk is kept releasable at all times, which is what makes continuous integration and continuous delivery practical.

Why trunk-based development needs feature flags

Committing to trunk constantly raises an obvious problem: how do you merge code for a feature that is not finished? The answer is to merge it dark — wrapped in a feature flag held off. The incomplete work lives on trunk, integrates continuously with everyone else's changes, and stays invisible until the flag is turned on. Without flags, teams fall back to long-lived branches and the painful big-bang merges trunk-based development exists to avoid.

The relationship to CI/CD

Trunk-based development is the branching half of continuous integration: small commits to a shared trunk keep integration conflicts tiny and constant rather than rare and enormous. Feature flags are the release half — they let a green, deployable trunk ship at any time while unfinished features stay hidden. Together they let "merge often" and "release when ready" coexist, which is the foundation most progressive delivery practices build on.

Want the full picture? Read the concept guide: What are feature flags? →

Try it in your own app

Free Solo plan covers 10 flags and 2 environments. No credit card, no demo call — sign up and ship.