Merging รวมการเปลี่ยนแปลงจาก branch หนึ่งเข้ากับอีก branch หนึ่ง — โดยทั่วไปคือการนำ feature branch ที่เสร็จแล้วกลับเข้าสู่ branch หลัก Git จัดการการ merge ส่วนใหญ่ได้โดยอัตโนมัติ แต่การเข้าใจประเภทของ merge และ conflicts เป็นสิ่งสำคัญ
merge พื้นฐาน
git switch main # be on the branch you want to merge INTO
git merge feature-x # merge feature-x's changes into main
คุณสลับไปยัง branch (branch ที่จะรับการเปลี่ยนแปลง) แล้ว merge branch เข้าไปในมัน
