Git pager and difftool
Pager mode inspects stdin: patch-like content opens the review UI, while ordinary pager text uses Hunk's plain-text fallback.
Configure the Git pager
Section titled “Configure the Git pager”git config --global core.pager "hunk pager"Afterward, commands such as git diff and git show can open in Hunk. Git controls pager input, so untracked files are not synthesized in this mode.
Keep your normal pager and add opt-in aliases instead:
git config --global alias.hdiff '-c core.pager="hunk pager" diff'git config --global alias.hshow '-c core.pager="hunk pager" show'Plain-text fallback
Section titled “Plain-text fallback”Output that is not a unified diff never opens the review UI; Hunk streams it to a plain-text pager instead. The pager command comes from HUNK_TEXT_PAGER, then PAGER, then falls back to less -R. A value that resolves back to hunk is ignored so Git can never recurse into hunk pager itself.
Configure Git difftool
Section titled “Configure Git difftool”Tell Git how to invoke Hunk for each temporary file pair:
git config --global diff.tool hunkgit config --global difftool.hunk.cmd 'hunk difftool "$LOCAL" "$REMOTE" "$MERGED"'git config --global difftool.prompt falseThen run:
git difftoolDifftool is pair-oriented because Git invokes the command once per file. Prefer hunk diff when you want Hunk's native full-changeset stream.
Undo the integration
Section titled “Undo the integration”git config --global --unset core.pagergit config --global --remove-section difftool.hunk