Merge Conflict Cause
Question
When does a merge conflict occur?
Hint
Conflicts happen with concurrent edits to the same lines.
Explanation
A merge conflict occurs when Git cannot automatically reconcile changes — typically when the same lines of a file are modified differently in both branches. Git marks the conflict with <<<<<<<, =======, and >>>>>>> markers. You must manually choose which version to keep, remove the markers, and commit the resolution. Conflicts do not happen when changes are in different files or different lines.
Related Resources
Related Lessons
- Merge Conflicts
Learn merge conflicts.
Look up unfamiliar terms
A beginner-friendly glossary explains jargon in plain English — variables, functions, DOM, Promise, and more.
Decode error messages
Plain-English explanations of common errors — what they mean, why they happen, and how to fix them.
Build real projects
Apply what you learned by building guided projects with starter code and solutions.