- See which files clash
git statusThey're listed under “Unmerged paths”.
- Open each file and choose
git diffEach clash sits between <<<<<<< and >>>>>>>. Keep the lines you want and delete the markers.
- Mark the file as fixed
git add index.html - Finish the merge
git commit --no-edit
Check it worked
- Check nothing is left
git diff --checkNothing is printed when every marker is gone.
Undo it
- Give up and go back
git merge --abortCancels the whole merge. Nothing is lost.
- See which files clash
git statusThey're listed under “Unmerged paths”.
- Open each file and choose
git diffEach clash sits between <<<<<<< and >>>>>>>. Keep the lines you want and delete the markers.
- Mark the file as fixed
git add index.html - Finish the merge
git commit --no-edit
Check it worked
- Check nothing is left
git diff --checkNothing is printed when every marker is gone.
Undo it
- Give up and go back
git merge --abortCancels the whole merge. Nothing is lost.
- See which files clash
git statusThey're listed under “Unmerged paths”.
- Open each file and choose
git diffEach clash sits between <<<<<<< and >>>>>>>. Keep the lines you want and delete the markers.
- Mark the file as fixed
git add index.html - Finish the merge
git commit --no-edit
Check it worked
- Check nothing is left
git diff --checkNothing is printed when every marker is gone.
Undo it
- Give up and go back
git merge --abortCancels the whole merge. Nothing is lost.

New to Merge conflict? I explain it in plain English on Layman Terms.