Merge conflicts occur when Git can't automatically combine changes (both sides modified the same lines). Resolving them involves understanding the conflict markers, deciding the correct result, and completing the merge. Doing it confidently is an important practical skill.
When and why conflicts happen
Git auto-merges most changes, but a CONFLICT occurs when both branches changed the
SAME LINES (or one deleted what the other modified) — Git can't decide, so it asks YOU.
→ Conflicts are NORMAL in collaboration, not errors — just changes Git can't auto-resolve.
Understanding the conflict markers
<<<<<<< HEAD
code from YOUR current branch (the one you're merging INTO)
=======
code from the OTHER branch (the one being merged IN)
>>>>>>> feature-branch
