Hands conflicts to vimdiff/meld/kdiff3/etc.
git mergetool shells out to an external 3-way merge tool for every unmerged path. When the conflict markers in your editor turn into a wall of <<<<<<<, this is the escape hatch.
It's a driver, not a merger. Git already produced LOCAL, REMOTE, and BASE; mergetool just hands those three files to vimdiff/meld/kdiff3 and writes whatever you save back into the working tree.
git mergetool [--tool=<tool>] [--tool-help] [-y|--no-prompt|--prompt]
[-O<orderfile>] [--[no-]gui] [<file>...]| Flag | What it does |
|---|---|
--tool=<tool> | Pick a tool: vimdiff, meld, kdiff3, bc, opendiff, ... |
--tool-help | List the merge tools Git knows how to drive on this box. |
-y, --no-prompt | Skip the Hit return to start merge resolution tool prompt. Use this if you trust the tool. |
-O <orderfile> | Process conflicts in the order listed in <orderfile>. Handy for huge merges. |
--gui / --no-gui | Honor merge.guitool instead of merge.tool. Or don't. |
--prompt | ⚠️ The default. Annoying when scripted; explicit when interactive. |
mergetool enumerates remaining conflicts.git mergetool --tool-helpgit mergetool --tool=meld -ygit config --global merge.tool kdiff3
git config --global mergetool.keepBackup false
git mergetoolgit mergetool src/parser.cmergetool.keepBackup = false once you trust your tool — those *.orig files breed in your working tree.vimdiff is powerful; meld is friendlier. Don't audition during a fire.merge.conflictStyle = zdiff3 — even with mergetool, the in-file markers improve when you peek.mergetool.keepBackup=false leaves .orig files everywhere. Add them to .gitignore or clean up.mergetool.<tool>.cmd strings need correct quoting of $LOCAL/$REMOTE/$BASE/$MERGED. Get it wrong and you'll silently lose work.Hit each option, then Check answers. Score is recorded; Next is always open.