git merge conflict — how to resolve
Quick Answer
# 1. See which files have conflicts
git status
# 2. Open each conflicted file and edit it
# Remove <<<<<<<, =======, >>>>>>> markers and keep what you want
# 3. Mark as resolved and finish the merge
git add .
git merge --continue
When this happens
CONFLICT (content): Merge conflict in src/app.ts
Automatic merge failed; fix conflicts and then commit the result.
Git stopped the merge because the same lines were changed on both branches. You must manually choose which version to keep.
Other causes & fixes
What the conflict markers mean
<<<<<<< HEAD
your changes on the current branch
=======
incoming changes from the branch being merged
>>>>>>> feature-branch
Use a visual merge tool
If you prefer a GUI, open the conflict in VS Code or run a diff tool.
git mergetool # opens the configured merge tool
# or open in VS Code:
code . # then click "Resolve in Merge Editor"
Abort the merge and start over
git merge --abort # restores the state before git merge
Related