dev-tools
Glossary ↗Trunk-Based Development
Trunk-based development is a version-control workflow where every developer commits to a single shared branch — the "trunk" (usually main) — many times a day, keeping branches either non-existent or extremely short-lived (hours, not weeks). Instead of long-running feature branches that drift apart and produce painful merges, work is integrated continuously and incomplete features are hidden behind feature flags until they're ready. This is the branching model that makes true continuous integration possible: because everyone integrates against the same up-to-date trunk constantly, merge conflicts stay small and "it works on my branch" surprises disappear. For AI/SaaS teams shipping multiple times a day, trunk-based development is the default at most high-velocity engineering orgs. Practical note: it demands strong automated tests and code review on every commit, plus feature flags to decouple deploy from release — you can merge unfinished code safely because it's flagged off in production. Teams that adopt trunk-based development without that safety net just move the pain from merges to broken builds.
Related terms