Diff and Merge Tools

Diff and Merge Tools

Use GitComet as a standalone Git difftool or mergetool in headless or GUI mode.

Using as a Git difftool / mergetool

GitComet can be used as a standalone diff and merge tool invoked by git difftool and git mergetool.

It supports both headless mode for algorithm-only workflows and GUI mode for an interactive GPUI window.

Setup / uninstall

The recommended way to integrate GitComet with Git is to let GitComet configure the tool entries for you.

# Configure Git globally to use GitComet for both difftool and mergetool
gitcomet setup

# Remove GitComet integration safely
gitcomet uninstall

Use --local to target only the current repository instead of global Git config.

Use --dry-run to print the commands before applying changes.

setup registers both headless and GUI variants with guiDefault=auto, so Git chooses GUI when a display is available and falls back to headless otherwise.

setup and uninstall are designed to be idempotent.

Difftool mode

Use difftool mode when GitComet should compare two file versions.

gitcomet difftool --local <path> --remote <path> [--path <display_name>] [--label-left <label>] [--label-right <label>]

When Git invokes GitComet as a difftool, GitComet can also read LOCAL and REMOTE from the environment as a fallback.

Mergetool mode

Use mergetool mode when GitComet should help resolve a merge conflict into the merged output file.

gitcomet mergetool --local <path> --remote <path> --merged <path> [--base <path>] [--label-local <label>] [--label-remote <label>] [--label-base <label>]

GitComet also reads LOCAL, REMOTE, MERGED, and BASE from the environment when invoked by Git.

--base is optional for add/add conflicts.

Compatibility

GitComet supports KDiff3- and Meld-style invocation forms, including:

  • --L1, --L2, and --L3
  • -o, --output, and --out
  • --base
  • positional arguments

That makes GitComet suitable as a drop-in replacement in existing difftool and mergetool setups.

Documentation

Search

move open Esc close

Browse the docs or start typing to filter results.