Trunk Based Development and Feature Flags for Continuous Delivery
4 min readJul 28, 2020
Trunk Based Development is a branching model in which developers create short-lived feature branches and merge back into the “trunk” branch, often called as the master branch.
The guiding principals of Trunk Based Development
- There is one “trunk” branch where developers merge their changes.
- Developers should merge small changes as often as they can.
- Merges must be reviewed, tested, and must not destroy the “trunk”.
- All code in “trunk” must be release ready at all times.
- Feature branches must be short-lived.
- Keep your commit messages as concise as possible
Comparing Trunk Based Development to GitFlow
The Trunk Based Branching Model
The below model can be used for scaled teams, the development is done with short-lived feature branches, the changes are often merged to the “trunk”. For small teams, the developers can directly merge the changes to the “trunk” in small chunks.