Set up git mergetool and git difftool on macOS
git mergetool opens each file that a merge left in conflict in a merge tool, and git difftool shows changes in a diff tool instead of the terminal. Both need to be told which tool to open. This guide sets up Seamerge, a free, native diff and merge tool for the Mac, for both.
Updated 21 November 2026 · Seamerge 0.7.0
Before you start
- A Mac with Apple silicon and macOS 26.1 or later, and Git, for example from the Xcode Command Line Tools.
- Seamerge in your Applications folder. Download the latest release and move
Seamerge.appthere, or install it with Homebrew:brew install --cask cykedev/tap/seamerge
Set it up from the app
- Open Seamerge and choose Seamerge ▸ Set Up Git Integration… The welcome window offers the same command in its bottom line, which also says whether Git uses Seamerge yet.
- Read the sheet. It says what changes, names the tool it replaces, if any, and Show Commands lists every entry it writes.
- If you use Git-Tower, tick Add Seamerge to Tower.
- Click Set Up.
Seamerge writes its entries to your global Git configuration, so they apply to every repository that does not set its own tool. Git keeps the values it replaces, so Remove in the same sheet restores the configuration as it was.
Or set it up by hand
These are the entries the sheet writes, for Seamerge in /Applications. If the app lives elsewhere, change the path; the sheet does that for you.
git config --global merge.tool seamerge
git config --global mergetool.seamerge.cmd '/Applications/Seamerge.app/Contents/Helpers/seamerge merge --from-git --base "$BASE" --local "$LOCAL" --remote "$REMOTE" --output "$MERGED"'
git config --global mergetool.seamerge.trustExitCode true
git config --global mergetool.prompt false
git config --global mergetool.keepBackup false
git config --global diff.tool seamerge
git config --global difftool.seamerge.cmd '/Applications/Seamerge.app/Contents/Helpers/seamerge diff --collect --path "$MERGED" -- "$LOCAL" "$REMOTE"'
git config --global difftool.prompt false
git config --global difftool.trustExitCode true
merge.toolanddiff.tool- Name the tool that
git mergetoolandgit difftoolopen. mergetool.seamerge.cmd- The command Git runs for each conflicted file. It passes the base, both sides and the file to write;
--from-gittells Seamerge that Git waits for it. mergetool.seamerge.trustExitCode- Git takes the result from Seamerge: Done marks the file as resolved, Leave Unresolved keeps the conflict.
mergetool.promptanddifftool.prompt- Git opens the tool without asking before each file.
mergetool.keepBackup- Git leaves no
.origcopies of the conflicted files behind. difftool.seamerge.cmd- The command Git runs for each changed file. With
--collect, the files of one run come together in one window, and Git does not wait for it. difftool.trustExitCodegit difftoolstops when Seamerge reports an error, instead of going on with the next file.
Use it
Merges
When git merge, git rebase or git cherry-pick stops with conflicts, run:
git mergetool
Seamerge opens the first conflicted file. Decide its conflicts and press ⌘↩; Git takes the file as resolved and opens the next one. Resolve Git merge conflicts on a Mac walks through a merge.
Diffs
git difftool # changes in the working tree
git difftool --staged # changes staged for the next commit
git difftool main feature # two branches
git difftool --dir-diff main # all files, as two folders
When a run compares several files, Seamerge shows them in one window with a sidebar instead of a window per file. --dir-diff compares the two versions as folders in one window.
Without Git
Seamerge ▸ Install Command Line Tool… puts a seamerge command into /usr/local/bin, so you can compare any two files or folders from Terminal, for example seamerge old.txt new.txt. In Finder, select two files or two folders and choose Compare with Seamerge from the Services menu.
Try it without changing your configuration
If you cloned the repository, Examples/make-git-conflict.sh <directory> makes a throwaway repository in which a merge stops with ten conflicts. The two commands it prints open them in Seamerge and pass their settings with -c, so they work before the setup.
Git-Tower
- In the set-up sheet, tick Add Seamerge to Tower before you click Set Up.
- Restart Git-Tower.
- In Git-Tower's settings, under Git Config, choose Seamerge as the diff tool and as the merge tool.
To compare whole folders in Git-Tower, turn on Perform directory diff.
Undo it
Open Seamerge ▸ Set Up Git Integration… again and click Remove. Your Git configuration is as it was before the setup. If you wrote the entries by hand, remove them by hand:
git config --global --remove-section mergetool.seamerge
git config --global --remove-section difftool.seamerge
git config --global --unset merge.tool
git config --global --unset diff.tool
Then set mergetool.prompt, mergetool.keepBackup, difftool.prompt and difftool.trustExitCode back to the values you had, or unset them.