Collate

Use Collate for git difftool and mergetool

Collate includes a standalone collate command on macOS and Linux. Alongside opening full repository reviews, it serves as both your git difftool and your 3-way git mergetool.

One-click setup inside Collate

Open Collate and choose either:

  • Settings > Review > Git's diff and merge tool
  • Help > Use Collate for git difftool and mergetool (or run it from the Command Palette via Shift+Cmd+P)

Collate writes your user-level git configuration pointing directly to the installed binary and sets mergetool.collate.trustExitCode = true so saving a resolved merge tells git the file is ready.

Manual ~/.gitconfig setup

If you manage dotfiles in git or prefer configuring ~/.gitconfig by hand, add:

[diff]
  tool = collate
[difftool "collate"]
  cmd = collate "$LOCAL" "$REMOTE" --title "$MERGED"
[merge]
  tool = collate
[mergetool "collate"]
  cmd = collate --merge "$BASE" "$LOCAL" "$REMOTE" "$MERGED"
  trustExitCode = true

Or configure it from your shell:

git config --global diff.tool collate
git config --global difftool.collate.cmd 'collate "$LOCAL" "$REMOTE" --title "$MERGED"'
git config --global merge.tool collate
git config --global mergetool.collate.cmd 'collate --merge "$BASE" "$LOCAL" "$REMOTE" "$MERGED"'
git config --global mergetool.collate.trustExitCode true

Resolving conflicts in the 3-way merge editor

When a merge or rebase stops with conflicts, run git mergetool (or open the conflicted file inside Collate). The merge editor keeps the workflow on the keyboard:

  • n and p jump to the next or previous conflict.
  • 1 takes Ours, 2 takes Theirs, and 3 keeps Both.
  • Save when every conflict is resolved; with trustExitCode = true, git marks the file resolved cleanly.

Opening diffs and patches from the CLI

When installed via Homebrew or npx collate-app@latest, the collate launcher opens a new window for a repository or waits on stdin/file comparisons:

collate                         # open changes in the current repository
collate main..topic             # compare two branches or commits
collate HEAD~2                  # inspect an older commit in History
collate --staged                # show only staged changes
collate --split -- src/api      # split layout filtered to a folder
collate a.rs b.rs               # compare two files
collate old/ new/               # compare two directories
git diff | collate              # read a patch from standard input
collate fix.patch               # open a patch file