Simulate and guide through git merge conflict resolution strategies. Part of the DevTools Surf developer suite. Browse more tools in the Developer Utilities collection.
Use Cases
Practice conflict resolution strategies on synthetic conflicts before encountering them in a real codebase.
Understand the difference between 'ours/theirs' semantics during merge vs. rebase operations.
Learn how to resolve structural conflicts where both sides deleted and replaced the same block.
Train team members on conflict resolution without risking data loss on production branches.
Tips
Read both sides of the conflict before choosing — the 'ours' and 'theirs' labels can be counterintuitive during a rebase (they swap meanings).
Use a 3-way diff view to see the common ancestor alongside both conflicting versions, which makes the right resolution clearer.
After resolving, stage only the resolved files with 'git add <file>' — don't 'git add .' to avoid accidentally staging unresolved conflicts.
Fun Facts
Git conflict markers (<<<<<<< ======= >>>>>>>) were adopted from the diff3 utility, which dates to the early 1990s and was designed for merging text files — not source code.
The most common source of merge conflicts is concurrent edits to the same function signature — renaming a parameter in one branch while adding logic that uses the old name in another.
GitHub reports that the average pull request on public repos takes 4.5 days to merge. Repos with automated conflict detection (CI checks) reduce this to 2.8 days on average.
FAQ
What's the difference between 'ours' and 'theirs'?
During a merge: 'ours' is the branch you're merging INTO (current branch), 'theirs' is the branch being merged. During a rebase these swap — 'ours' becomes the branch being rebased onto.
How do I abort a merge mid-conflict?
Run 'git merge --abort' to restore the pre-merge state. For rebase, use 'git rebase --abort'. Both commands clean up staged conflict markers.
Can I configure my own merge tool?
Yes — set git config merge.tool vimdiff (or meld, kdiff3, etc.). The simulator shows the equivalent three-panel view that external merge tools use.