Common causes
- Two branches edited the same lines in the same file
- One branch deleted a file that the other branch modified
- A rebase introduced changes that conflict with local work
- Merging a long-lived branch that diverged significantly from main
How to fix it
- Open the conflicted file and look for conflict markers: <<<<<<< HEAD, =======, >>>>>>> branch
- Edit the file to keep the version you want, removing all conflict markers
- Stage the resolved file: git add <filename>
- Complete the merge: git commit (or git rebase --continue if rebasing)
Example
CONFLICT (content): Merge conflict in src/App.js
Automatic merge failed; fix conflicts and then commit the result.Running git merge or git pull when both branches changed the same lines
Have a different error?
Paste any error message into the Error Translator to get an instant explanation.
