Back to glossary

Trunk-Based Development

A source control branching model where developers integrate small, frequent changes directly into the main branch, avoiding long-lived feature branches and reducing merge conflicts.

Trunk-based development keeps all developers working on a single shared branch (main or trunk). Instead of creating feature branches that live for days or weeks, developers commit small incremental changes directly to trunk, often multiple times per day. Feature flags hide incomplete work from users until it is ready.

This approach minimizes integration pain. Long-lived branches diverge from the main codebase, creating complex merge conflicts and making it harder to reason about the system's current state. With trunk-based development, the codebase is always in a near-releasable state, and every commit is validated by CI within minutes.

The practice pairs naturally with CI/CD pipelines and feature flags. Developers commit code behind feature flags, CI validates each commit, and the feature is toggled on when complete. This workflow enables teams to deploy continuously while maintaining control over what users see, making it the preferred branching strategy for high-performing engineering organizations.

Related Terms