PlainError

CONFLICT (content): Merge conflict in src/app.js | Automatic merge failed; fix conflicts and then commit the result.

Last checked 2026-11-11 · 3 fixes · reviewed answer

TL;DRGit tried to combine changes from two branches but found overlapping edits in the same part of src/app.js, so it stopped and left conflict markers in the file for you to fix manually.

Most likely cause: Two branches edited the exact same lines in src/app.js at the same time

Try first: Open the conflicted file and look for conflict markers

Likely causes

  1. Two branches edited the exact same lines in src/app.js at the same timemost likely
  2. One branch deleted or moved code that another branch also changedpossible

How to fix it

Safest first: SafeChanges settingsDangerous
  1. Open the conflicted file and look for conflict markersSafe

    Open src/app.js in your editor. Look for lines that start with <<<<<<, =======, and >>>>>>. These show the two versions that conflict.

  2. Edit the file to keep the correct version and remove markersChanges settings

    Decide which changes to keep (or combine them), delete the <<<<<<, =======, and >>>>>> lines, then save the file.

  3. Mark the file as resolved and finish the mergeChanges settings

    Run git add src/app.js to tell Git the conflict is fixed, then run git commit to complete the merge.

    git add src/app.js && git commit

    ⚠ This changes your repository history; make sure you have reviewed the final code.

If that didn't fix it

Run git status to see the current state of the merge and list any remaining conflicted files.

When to see a technician

Get help from someone familiar with Git if you are unsure which version of the code to keep or if the merge involves critical shared code.

Quick answers

What does CONFLICT (content): Merge conflict in src/app.js | Automatic merge failed; fix conflicts and then commit the result. mean?
Git tried to combine changes from two branches but found overlapping edits in the same part of src/app.js, so it stopped and left conflict markers in the file for you to fix manually.
What causes CONFLICT (content): Merge conflict in src/app.js | Automatic merge failed; fix conflicts and then commit the result.?
Two branches edited the exact same lines in src/app.js at the same time. (most likely) One branch deleted or moved code that another branch also changed. (possible)
How do I fix CONFLICT (content): Merge conflict in src/app.js | Automatic merge failed; fix conflicts and then commit the result.?
Try these in order, safest first: 1. Open the conflicted file and look for conflict markers. 2. Edit the file to keep the correct version and remove markers. 3. Mark the file as resolved and finish the merge.
What if that didn't fix it?
Run git status to see the current state of the merge and list any remaining conflicted files.
When should I see a technician?
Get help from someone familiar with Git if you are unsure which version of the code to keep or if the merge involves critical shared code.
Did this fix it? Report a problem

Related errors

All Coding errors →