Trunk-based development เป็นกลยุทธ์ branching ที่ developer integrate การเปลี่ยนแปลงเล็ก ๆ เข้าสู่ branch หลักเดียว (trunk) บ่อย ๆ โดยใช้ branch อายุสั้นมาก (หรือ commit โดยตรง) มันเกี่ยวข้องอย่างมากกับ CI/CD ที่มีประสิทธิภาพสูง เพราะมันทำให้ continuous integration เกิดประโยชน์สูงสุด
trunk-based development คืออะไร
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.
