Trunk-Based Dev
Short-lived branches and continuous integration
Trunk-based development keeps branches short-lived and merges to main constantly. It works well with CI/CD.
Everyone commits to main (trunk) frequently. Branches live for hours, not weeks.
main (trunk)
A
add header
Alice
B
fix nav
Bob
C
update api
Carol
A
style fix
Alice
Terminal
# Trunk-based development rules: # # 1. main is always deployable # 2. Branches last 1-2 days max # 3. Merge to main at least daily # 4. Use feature flags for incomplete work # 5. CI runs on every push