Direct answer
How do I resolve a Git merge conflict with Diff Anything?
Set up Diff Anything as Git’s merge tool, then run git mergetool when a merge stops with conflicts. Diff Anything Pro shows the local and remote versions against their common base, with an editable result below. The Mac App Store version needs the free command-line helper first. Git waits until you save and close the merge window. Your files stay on your computer, with no AI involved.
color: bluecolor: greencolor: redSet up once
Make Diff Anything the merge tool Git opens.
On Mac, install the free command-line helper before running these settings. In the app, Settings › Command line links to the download. The helper adds the diff-anything command for the Mac App Store version.
Run these three commands in your terminal. They configure the merge tool for your user account; they do not start a merge or change your repository’s files.
- git config --global merge.tool diff-anything
- git config --global mergetool.diff-anything.cmd 'diff-anything --merge-tool "$BASE" "$LOCAL" "$REMOTE" "$MERGED"'
- git config --global mergetool.diff-anything.trustExitCode true
Base, Ours and Theirs
Keep what Git merged. Decide the remaining conflicts.
Git supplies the base, local, remote and merged file paths. At the top, each side is compared with Base. Below, the result keeps every line outside the conflicts Git left.
The tutorial resolves two conflicts in a settings file: choose the branch’s last-order time with Accept theirs, then put New Year’s Eve before New Year’s Day with Theirs then ours. The fee and delivery radius were already merged by Git.
Finish the merge
Save the resolved file and hand control back to Git.
Save and close writes the result to the merged file and exits successfully. Git can then continue. Cancel or closing the window leaves the merged file as Git wrote it.
If unresolved conflict markers remain, saving them requires confirmation. Review the result before committing; the tool does not decide which business rule belongs in your code.
Pro and platforms
The merge tool is included with Pro.
Merging, resolving conflict markers, the merge driver and the merge tool require Diff Anything Pro. The command-line helper is free; installing it does not unlock Pro. Seeing how many conflicts a file contains is free.
The Mac App Store version uses the helper to read Git’s files and open the merge in the app. On Windows, the Microsoft Store version is itself the merge tool. Both workflows process the files locally.
Best for
Where this workflow fits.
- Resolving a Git merge conflict in code or another text file
- Keeping the changes Git already merged while deciding the remaining conflicts
- Reviewing Base, Ours and Theirs without uploading source code
No accounts, cloud comparison service, analytics, or telemetry.
Relevant capabilities
What Diff Anything brings to the job.
Practical workflow
From setup to a reviewed result.
Install the helper and set up Git
With the Mac App Store version, install the free command-line helper linked below, then run the three Git settings shown in this guide. The merge tool requires Pro.
Run git mergetool
When git merge stops with a conflict, run git mergetool in the repository. Git opens each conflicted file in Diff Anything and waits.
Review both sides against Base
The local version is Ours and the remote version is Theirs. The result starts from the conflicts Git left in the file and keeps the lines Git already merged.
Choose or edit the resolution
Use Accept ours, Accept theirs, Ours then theirs, Theirs then ours or Use base for each conflict, or type in the result yourself.
Save, close and commit
Choose Save and close (Command-S). The result is written back and control returns to Git. Review the changes, then commit. Cancel leaves the file as Git wrote it.
Direct answers
Questions about three-way merge tool.
How do I resolve a Git merge conflict with Diff Anything?
Set up Diff Anything as Git’s merge tool, then run git mergetool when a merge stops with conflicts. Diff Anything Pro shows the local and remote versions against their common base, with an editable result below. The Mac App Store version needs the free command-line helper first. Git waits until you save and close the merge window. Your files stay on your computer, with no AI involved.
Do I need to save Git’s stages into separate files first?
No. After setup, git mergetool supplies the four file paths and opens the merge window. Git waits for the result.
Does the Mac App Store version need a helper?
Yes. Install the free command-line helper first. It reads the paths Git supplies, opens the merge in the app and writes the result when you choose Save and close. The merge tool also requires Pro.
Does Save and close commit the merge?
No. It writes the resolved file and returns control to Git. Review the result and commit separately.
Is the merge tool free?
The command-line helper is free. Merging and the merge tool require Diff Anything Pro. On Free, the merge-tool window offers Pro and exits without changing the merged file.
Are my files uploaded?
No. The merge runs on your computer and sends none of your file data to an AI model.
Go deeper
Choose sources, understand automatic detection, and select the engine that answers the question you are actually asking.
Read Choose the right comparison modeFree & Pro: what’s included
Available on the Mac App Store and Microsoft Store. Free desktop use lets you try every comparison engine for files up to 5 MiB per side and 10 new comparison sessions per local day; collection previews show the first 100 items, binary comparisons the first 100 byte differences, and PDF previews the first 3 pages. Plain text, JSON, and Jupyter notebook comparison are complete, and opening files from Finder or File Explorer, diffanything:// links, and AppleScript are free. The free CLI supports text, JSON, and notebooks, and in the Microsoft Store version previews folder synchronization with --dry-run, and the command-line helper that brings the CLI to the Mac App Store version is a free download that uses the Pro purchase made in the app. A one-time Pro purchase removes the preview and session limits and unlocks larger sources within technical limits, saved profiles and history, saving folder snapshots, report export and printing, JSON Patch export, applying patches, three-way merge and conflict resolution, the Git merge driver and merge tool, folder synchronization and Update both, file actions in folder comparisons, batch manifests, every CLI mode, and, on Windows, trusted preprocessors.