01
Overview
Conflicts occur when changes overlap. Markers: <<<<<<<, =======, >>>>>>>. Resolve by editing, then git add and commit/merge. Use merge tools (VS Code, kdiff3). Abort with git merge --abort. Rebase conflicts are similar but per-commit.
bash
git merge feature-branch
# CONFLICT in file.js
# Edit file, choose resolution
git add file.js
git commit # or git merge --continue
# Abort
git merge --abort02
Best Practices
Read both sides carefully. Use a merge tool (VS Code built-in). Keep conflicts small (frequent integration). Use git diff to understand changes. Test after resolving. Use git checkout --theirs/--ours for quick resolution. Communicate with the other author.
Ready to try Resolving Merge Conflicts?
Visit the official site for the latest version and full documentation.
Visit Resolving Merge Conflicts