How to Handle Merge Conflicts
Resolve a Merge Conflict
1
Identify Conflicts
git status shows files with conflicts after a failed merge.
2
Open the Files
Look for <<<<<< / ====== / >>>>>> markers — your changes vs theirs.
3
Edit & Stage
Pick the right code, remove markers, git add the file.
4
Complete the Merge
git commit finalizes the merge with the resolved content.
Build Programming Foundations at Noble Desktop
Noble Desktop's Full-Stack Web Development Certificate teaches Git alongside the modern web stack — a must for any developer.
Learn how to resolve merge conflicts in Git by viewing both sets of changes and deciding which to keep, with our step-by-step guide on handling them.