Web development
Branches and Merging
Updated Oct 28, 2026
A branch provides a named line of work. Create a branch for a change, commit your work there and merge when ready. A merge conflict occurs when Git cannot combine changes automatically; inspect the co
What you’ll learn
Understand and practise branches and merging.
Explanation
A branch provides a named line of work. Create a branch for a change, commit your work there and merge when ready. A merge conflict occurs when Git cannot combine changes automatically; inspect the conflicting content, resolve it and test the result.
Branch ជាខ្សែការងារមានឈ្មោះ។ អាចធ្វើការលើ branch រួច merge។ ប្រសិនបើមាន conflict ត្រូវពិនិត្យ កែ និងសាកល្បងលទ្ធផល។
Example
Create a branch for a new contact page and commit the change there.
Practice
What should you do when a merge has a conflict?
Answer and explanation
Show answer / បង្ហាញចម្លើយ
Inspect both changes, resolve the conflict and test the result.
Quick recap
A branch provides a named line of work.