Tools

delta: readable git diffs with syntax highlighting and side-by-side view

TL;DR

delta adds syntax highlighting to git diff, show, log -p and blame and highlights exactly which words changed. Four gitconfig lines, plus navigate, line-numbers and merge.conflictStyle = zdiff3.

Default git diff output uses just red and green for whole lines. When a single character changes in a long line, you squint to compare two nearly identical lines. In long multi-file diffs it's hard to tell which file you're in. delta is a pager for Git: syntax highlighting per language, highlighting of exactly which words changed within a line, line numbers, side-by-side mode, and shortcuts to jump between files.

GitHub page of dandavison/delta
GitHub page of dandavison/delta (screenshot, November 2026)

GitHub: https://github.com/dandavison/delta · about 33k stars · Rust · MIT

Installation

brew install git-delta           # macOS (package git-delta, command delta)
sudo apt install git-delta       # recent Ubuntu/Debian
cargo install git-delta          # with Rust

Configure Git to use delta

Run these four commands (from the README) so Git uses delta for all diff output:

git config --global core.pager delta
git config --global interactive.diffFilter 'delta --color-only'
git config --global delta.navigate true
git config --global merge.conflictStyle zdiff3

Or write it straight into ~/.gitconfig:

[core]
    pager = delta
[interactive]
    diffFilter = delta --color-only
[delta]
    navigate = true      # n / N to jump between diff sections
    line-numbers = true
    side-by-side = true  # two columns: old on the left, new on the right
[merge]
    conflictStyle = zdiff3

What changes once it's enabled

CommandDifference with delta
git diff, git showSyntax highlighting, word-level change highlighting, clear per-file headers
git log -pPress n/N to jump between commits and files
git add -pColoured hunks thanks to interactive.diffFilter
git blameCompact display, coloured by commit
Merge conflictsWith zdiff3 you also see the common ancestor, so you understand what each side changed

More tips

  • Compare any two files: delta old.json new.json.
  • Change themes: list them with delta --list-syntax-themes, then set syntax-theme under [delta].
  • Side-by-side on demand: leave side-by-side off by default and run git -c delta.side-by-side=true diff when needed, since two columns are cramped on narrow screens.
  • With ripgrep: rg --json "pattern" | delta gives syntax-highlighted search results.
  • In lazygit: set delta as the pager in lazygit's config for a nicer diff panel.

Caveats

  • If scripts parse git diff output, use git --no-pager diff or git diff | cat; Git usually skips the pager when piping, but check.
  • Side-by-side mode needs a wide terminal; long lines wrap.
  • The Homebrew and apt package is git-delta, not delta (a different package).

How to apply it

  • Dev: Configure once and every Git command looks better. Enable zdiff3 even without delta: it makes conflict resolution more accurate.
  • Tech Lead: When reviewing locally before pushing a PR, git diff main... with delta exposes small changes (punctuation, whitespace) that plain diffs blur.
  • PM: Faster, more accurate reviews directly reduce escaped bugs; it's a two-minute configuration change.

Sources & references

  1. dandavison/delta — dandavison (GitHub)