# 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 · [Seamerge](https://www.seamerge.app/) › [Guides](https://www.seamerge.app/#guides)

## 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](https://github.com/cykedev/seamerge/releases/latest) and move `Seamerge.app` there, or install it with Homebrew:

  ```sh
  brew install --cask cykedev/tap/seamerge
  ```

## Set it up from the app

1. 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.
2. Read the sheet. It says what changes, names the tool it replaces, if any, and **Show Commands** lists every entry it writes.
3. If you use Git-Tower, tick **Add Seamerge to Tower**.
4. Click **Set Up**.

![The sheet Use Seamerge for Git Merges and Diffs over the welcome window. It says that Git opens Seamerge when you run git mergetool or git difftool, that Git will no longer ask before opening a tool or keep .orig backup files, and offers Show Commands, the box Add Seamerge to Tower, and the buttons Cancel and Set Up.](https://www.seamerge.app/images/seamerge-git-setup-sheet-light.png)

The sheet says what changes before anything is written.

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.

```sh
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.tool` and `diff.tool`: name the tool that `git mergetool` and `git difftool` open.
- `mergetool.seamerge.cmd`: the command Git runs for each conflicted file. It passes the base, both sides and the file to write; `--from-git` tells 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.prompt` and `difftool.prompt`: Git opens the tool without asking before each file.
- `mergetool.keepBackup`: Git leaves no `.orig` copies 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.trustExitCode`: `git difftool` stops 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:

```sh
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](https://www.seamerge.app/resolve-git-merge-conflicts-mac.html) walks through a merge.

### Diffs

```sh
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](https://github.com/cykedev/seamerge), `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

1. In the set-up sheet, tick **Add Seamerge to Tower** before you click Set Up.
2. Restart Git-Tower.
3. 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:

```sh
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.

## Download Seamerge

Free and open source, signed and notarized. Requires macOS 26.1 or later on Apple silicon.

- [Download for macOS](https://github.com/cykedev/seamerge/releases/latest)
- [Source on GitHub](https://github.com/cykedev/seamerge)

## More guides

- [Resolve Git merge conflicts on a Mac](https://www.seamerge.app/resolve-git-merge-conflicts-mac.html): what a conflict is, how to decide it block by block, and how to finish the merge.
- [What is a three-way merge?](https://www.seamerge.app/three-way-merge.html): why the base matters, how Git finds it, and when a change becomes a conflict.

---

Seamerge is free software under the [MIT License](https://github.com/cykedev/seamerge/blob/main/LICENSE). Not affiliated with Perforce, Git or Git-Tower. · [About, imprint and privacy](https://www.seamerge.app/about.html) · [Contact](https://www.seamerge.app/contact.html)
