トランクベース開発は、開発者が小さな変更を頻繁に単一のメインブランチ(トランク)に統合するブランチ戦略で、非常に短命なブランチを使用するか、直接コミットします。継続的統合を最大化するため、高性能なCI/CDと強く関連しています。
トランクベース開発とは
Developers commit small, frequent changes to a SINGLE shared branch (trunk/main):
→ very SHORT-LIVED branches (merged within hours or a day) — or commit directly
→ integrate continuously (multiple times a day) into trunk
→ trunk is kept always RELEASABLE (working, deployable)
→ vs long-lived feature branches that diverge for days/weeks before merging.
CI/CDをうまくサポートする理由
✓ MAXIMIZES continuous INTEGRATION — frequent small merges = the essence of CI
(catch integration issues immediately; tiny, easy-to-resolve conflicts)
✓ AVOIDS "merge hell" — no long-lived branches diverging → no big painful merges
✓ Small changes = lower risk, easier review, faster feedback
✓ Keeps trunk always deployable → enables continuous DELIVERY/deployment
→ Research (DORA) links trunk-based development to high delivery performance.
