---
title: "git delta"
url: https://perrotta.dev/2025/06/git-delta/
last_updated: 2026-01-03
---


I've been using the venerable
[`diff-highlight`](https://github.com/git/git/tree/master/contrib/diff-highlight)
script to power various `git diff` operations in the terminal. It is a decent
improvement on top of stock `git diff`, but it's somewhat of an
[annoying](https://github.com/thiagowfx/.dotfiles/blob/94fa66d62260c7c5e133f50beef6181f098b3599/git/.profile.d/git.sh#L11)
maintenance burden to manage it across various environments, as it's installed
in different ways on various systems:

```shell
#!/bin/sh

if hash git >/dev/null 2>&1; then
	# git-diff-highlight: alpine:/usr/bin/, arch, debian
	path_munge "/usr/share/git/diff-highlight" "/usr/share/doc/git/contrib/diff-highlight"

	# brew
	if hash brew >/dev/null 2>&1; then
		path_munge "$(brew --prefix)"/share/git-core/contrib/diff-highlight
	fi

fi
```

Thus I decided to migrate to [`git-delta`](https://github.com/dandavison/delta),
which is:

- quite popular
- written in Rust™[^1]
- [available](https://repology.org/project/git-delta/versions) in all package
  managers I'm interested in – hence it's **one install command away from my
  system**, no need for extra configs <== And this is the main reason I wanted
  to migrate to it.

On macOS, the package is called `git-delta` whereas the binary is called
`delta`:

```shell
% brew install git-delta
% brew ls git-delta | grep bin/
/opt/homebrew/Cellar/git-delta/0.18.2_3/bin/delta
```

The integration with `git` is as follows:

```shell
% grep -E '\[core\]|pager =|delta' ~/.gitconfig
[core]
        # delta > diff-highlight > plain cat
        pager = "delta --diff-highlight 2>/dev/null || ((diff-highlight 2>/dev/null || cat) | ${PAGER:-less})"
```

It falls back to `diff-highlight` when `delta` is not available.

`delta` is quite
[configurable](https://dandavison.github.io/delta/configuration.html):

```shell
% grep -EA3 '\[delta\]' ~/.gitconfig
[delta]
        navigate = true
        side-by-side = false
        line-numbers = true
```

One caveat of using `delta`: the `git diff` output is not suitable for sharing,
as it does not contain diff markers, relying on colors instead.
See [this post]({{< ref "2025-08-12-git-no-pager" >}}) for a workaround.

**Update(2025-09-07)**: I've been finding `delta` quite pleasant to use.

[^1]: Always an (over)hyped reason to migrate, but, oh well...

