trunk-based development
A branching practice where developers merge small changes into one main branch, the trunk, at least once a day, keeping any other branches short-lived.
In more detail
DORA's research describes it as three or fewer active branches, merging to trunk at least daily, and no code freezes. Because everyone integrates constantly, merge conflicts stay small, and it pairs with continuous integration and continuous delivery.
Related terms
- trunk — The single main branch that everyone integrates into, often called main.
- Git Flow — A branching model published by Vincent Driessen in 2010 with long-lived main and develop branches plus feature, release and hotfix branches.
- continuous integration — Automatically building and testing every change as soon as it is pushed, so problems are caught early.
- feature flag — A switch in the code, controlled from outside, that turns a feature on or off for chosen users without a new deployment.
- main branch — The branch a repository treats as its primary line of work, usually named main (older repositories often use master).
- continuous delivery — Keeping every change that passes the pipeline in a state where it could be released to production at any moment.
- DORA — DevOps Research and Assessment: a long-running research programme, now run by Google Cloud, that surveys software teams to find which practices predict better delivery.
Taught in
- Choosing A Branching Strategy — Microsoft Azure DevOps Engineer Expert (AZ-400) Exam Prep
- Trunk-Based Development Versus Git Flow — DevOps & Site Reliability Engineering
- Continuous Integration — DevOps & Site Reliability Engineering
- Trunk Based Development Versus Git Flow — Advanced Git Internals & Distributed Workflows