Web development
Resolving a Merge Conflict
Updated Oct 28, 2026
A conflict means Git could not combine some changes automatically. Open each conflicted file, understand both versions and edit the final content. Remove conflict markers, run relevant checks, stage t
What you’ll learn
Learn to apply resolving a merge conflict in a practical situation.
Explanation
A conflict means Git could not combine some changes automatically. Open each conflicted file, understand both versions and edit the final content. Remove conflict markers, run relevant checks, stage the resolved files and complete the merge according to the repository workflow.
Conflict កើតពេល Git មិនអាចបញ្ចូលការកែដោយស្វ័យប្រវត្តិ។ អានការកែទាំងពីរ កែជាលទ្ធផលត្រឹមត្រូវ លុបសញ្ញា conflict និងសាកល្បងមុនបញ្ចប់ merge។
Worked example
If two branches edit the same heading, decide which wording is correct and remove the conflict markers.
Practice
- Should you keep conflict markers in the final file?
- Apply the idea to an example of your own and explain your choice.
Answers and guidance
Show answers / បង្ហាញចម្លើយ
- No. Resolve the content and remove the markers before staging.
- Answers vary. Compare your example with the explanation and check each step.
Quick recap
A conflict means Git could not combine some changes automatically.