delta is a syntax-highlighting pager for Git, diff, and grep output.
It improves the readability of changes, commit history, and side-by-side diffs directly in the terminal.
The tool is installed through Homebrew and declared in the project Brewfile.
It is part of the curated Homebrew environment; see Homebrew setup to install everything at once.
Install delta directly:
brew install git-deltaVerify the installation:
delta --version
brew list --formula | grep -x git-deltaIn this setup, delta is already configured by the versioned
configs/git/.gitconfig (see Git setup), which sets it as the pager,
the interactive diff filter, and enables navigation and line numbers. Once that
file is included in your global config, no extra step is needed.
The manual commands below are only for using delta outside this repository's
configuration (e.g. on a machine where you have not included .gitconfig):
git config --global core.pager delta
git config --global interactive.diffFilter 'delta --color-only'
git config --global delta.navigate true
git config --global delta.line-numbers trueThe versioned configs/git/.gitconfig already contains the equivalent of:
[core]
pager = delta
[interactive]
diffFilter = delta --color-only
[delta]
navigate = true
line-numbers = true
side-by-side = false
[merge]
conflictStyle = zdiff3The exact visual settings can be adjusted later without changing the tool installation.
Display a diff through delta:
git diffDisplay staged changes:
git diff --stagedInspect a commit:
git showReview recent history with patches:
git log -pOnce configured as the Git pager, these commands use delta automatically.
Pipe a diff directly into delta:
diff -u old-file new-file | deltaDisplay delta options:
delta --helpWhen delta.navigate is enabled, use:
n Move to the next file or hunk
N Move to the previous file or hunk
q Quit the pager
Navigation depends on the active pager and terminal environment.
Enable side-by-side rendering temporarily:
git -c delta.side-by-side=true diffEnable it globally:
git config --global delta.side-by-side trueSide-by-side mode is useful on wide terminals but can be uncomfortable on smaller windows.
List available syntax themes:
delta --list-syntax-themesTest a theme:
git -c delta.syntax-theme='<theme-name>' diffTheme selection should remain readable in both the terminal background and the selected macOS appearance.
delta does not replace Git.
It only formats output produced by commands such as:
git diff;git show;git log;git blame;- interactive staging commands.
Git remains fully functional if delta is removed, provided the pager configuration is also reverted.
Confirm the active Git pager:
git config --global --get core.pagerConfirm the interactive diff filter:
git config --global --get interactive.diffFilterBypass delta temporarily:
git --no-pager diffDisable the configured pager temporarily:
GIT_PAGER=cat git diffRemove the Git configuration:
git config --global --unset core.pager
git config --global --unset interactive.diffFilter
git config --global --remove-section delta 2>/dev/null || trueRemove delta with Homebrew:
brew uninstall git-deltaThen remove its entry from profiles/full/Brewfile.
