Laws of Software Engineering · Practice
Practice
Trunk-Based Development
Everyone works on a single shared branch. Features ship behind flags until ready. Branches last hours rather than days.
How to use it. Use it when you want fast feedback and high deploy frequency. It pairs with CI and Continuous Delivery, and the three reinforce each other. You cannot have long-lived branches and trunk-based development at the same time.
How it gets misused. Confused with "no branches at all". Short-lived branches are fine. The thing to avoid is branches that diverge from trunk for days or weeks. The integration cost grows non-linearly with branch age.
Related
- Practice Continuous Integration Every change is merged to a shared trunk at least daily, with automated verification.
- Principle Continuous Delivery Keep software in a state where it could be released to users at any moment, by anyone, with confidence.