Use Mantish as your git diff tool
Wire mantish diff into git difftool, per file or per directory, globally or per repository.
mantish git-config writes the git configuration that makes git difftool open Mantish. It prints the commands first, so you can read them before anything changes.
mantish git-config
git config --global diff.tool mantish
git config --global difftool.mantish.cmd '"/usr/local/bin/mantish" diff "$LOCAL" "$REMOTE" --name "$MERGED" --format tui'
git config --global difftool.prompt false
# git difftool --dir-diff opens one mantish with the file navigator, instead of one per file
Happy with them? Let Mantish run them:
mantish git-config --install
| Flag | Effect |
|---|---|
--install | Run the commands instead of printing them |
--global | The user's git configuration — every repository (default) |
--local | Only the repository you are standing in |
--exe PATH | The mantish path git should run (default: this binary) |
By default the path written is this binary, resolved through the PATH entry that points at it when there is one — so a package manager's stable link is written rather than a versioned path its next upgrade removes. Use --exe mantish if you would rather git just looked it up on PATH.
--format tui is pinned into the command on purpose: a profile that defaults to text output cannot turn your interactive difftool into a dump on the terminal.
Using it
git difftool HEAD~1 # one Mantish per file, in turn
git difftool --dir-diff main # one Mantish, with every file in the navigator
git difftool --dir-diff # unstaged work, all at once
--dir-diff is the one to reach for: git materialises both sides into temporary trees and Mantish opens them as a directory comparison, so you move between files with [ / ] / f instead of quitting and re-launching per file. Mantish never writes back into those temporary trees.
Windows
The printed lines are quoted for a POSIX shell such as Git Bash. From cmd or PowerShell, run mantish git-config --install — it calls git directly, without a shell, so the quoting cannot bite.
Exit codes
difftool.trustExitCode is deliberately not set, so a Mantish failure does not abort a git difftool run over many files. Quitting the review normally returns 0; a failed comparison exits 2 and prints why. See Choosing a format.
What about git mergetool?
Not supported yet. Merging needs a three-way view ($BASE, $LOCAL, $REMOTE) and a write path back into $MERGED, which is a feature of its own rather than a flag on this one. It is planned; until it ships, mantish git-config configures diff.tool only and leaves your existing merge.tool untouched.