Resolve Git Merge Conflicts
Conflict markers
code
<<<<<<< HEAD Your changes ======= Their changes >>>>>>> branch-name
Resolution workflow
- •View conflicts:
git status - •Edit file: Remove markers, combine changes from both branches
- •Stage resolved file:
git add <file> - •Complete merge:
git merge --continue
Principles
- •Understand what each branch changed before resolving
- •Keep code from both branches when possible
- •Remove all three markers:
<<<<<<<,=======,>>>>>>>