Skip to main content

delta

A syntax-highlighting pager for git diff output, written in Rust. Configure delta once in your .gitconfig and every git diff, git show, and git log -p command becomes beautifully readable.

✓ Syntax highlighting via bat ✓ Side-by-side diffs ✓ Line numbers ✓ Written in Rust (fast)

What is delta?

delta (published as the git-delta crate) is a pager replacement for Git that transforms raw diff output into a rich, readable terminal display. It uses the same syntax highlighting library as bat to color code hunks by language, adds line numbers, supports true side-by-side layout, and even renders hyperlinks to file paths in supporting terminals.

Once you set pager = delta in your .gitconfig, delta enhances every git command that pages output — no extra flags needed. It also integrates with git add -p interactive staging via the diffFilter setting.

Key Features

Installation

# macOS (Homebrew)
brew install git-delta

# Rust / Cargo (any platform)
cargo install git-delta

# Windows (Scoop)
scoop install delta

# Windows (winget)
winget install dandavison.delta

# Linux (apt — Ubuntu/Debian)
# Download .deb from: https://github.com/dandavison/delta/releases
dpkg -i git-delta_*.deb

Recommended .gitconfig

[core]
    pager = delta

[interactive]
    diffFilter = delta --color-only

[delta]
    navigate = true          # use n and N to move between diff sections
    side-by-side = true      # enable side-by-side view
    line-numbers = true      # show line numbers
    syntax-theme = Dracula   # pick from bat's theme list
    hyperlinks = true        # clickable file paths in supported terminals

[merge]
    conflictstyle = diff3

[diff]
    colorMoved = default

After saving, run git diff HEAD~1 to see delta in action. Run delta --list-syntax-themes to pick a theme.

delta vs diff-so-fancy

Feature delta diff-so-fancy
ImplementationRust binaryShell script (Perl)
Syntax highlightingYes (Syntect)No
Side-by-side diffsYesNo
Line numbersYesNo
Navigate modeYesNo
No binary dependencyRequires binaryShell script only
PerformanceExcellent (Rust)Good
Active maintenanceYesSlowing

Use Cases

Pros and Cons

Pros

  • ✓ Dramatically improves diff readability
  • ✓ True syntax highlighting per language
  • ✓ Side-by-side mode for easy comparison
  • ✓ Fast Rust binary with minimal overhead
  • ✓ One-time .gitconfig setup, then automatic
  • ✓ Works with all git commands that use a pager

Cons

  • ✗ Requires binary installation (no shell-only option)
  • ✗ Side-by-side mode needs a wide terminal window
  • ✗ Some theme configurations require manual tuning
  • ✗ Adds a dependency to dotfiles/bootstrap scripts
  • ✗ Hyperlinks require a supporting terminal emulator

Frequently Asked Questions

What is delta?▼

delta (git-delta) is a syntax-highlighting pager for git diff and git log output, written in Rust by Dan Milstein. It replaces the default less pager with a rich terminal viewer that adds syntax-highlighted code, line numbers, side-by-side diffs, themed output, and clickable hyperlinks. You configure it once in .gitconfig and it enhances every git diff, git show, and git log -p command automatically.

How do I configure delta with git?▼

Add these lines to your ~/.gitconfig: [core] pager = delta. Also add [interactive] diffFilter = delta --color-only so that git add -p and interactive staging also use delta. Then add a [delta] section to configure options like side-by-side = true, line-numbers = true, and syntax-theme. Run 'delta --list-syntax-themes' to see available themes.

How does delta compare to diff-so-fancy?▼

diff-so-fancy is a shell script that post-processes git diff output to make it more readable. delta is a compiled Rust binary that acts as the pager itself. delta is significantly faster, has true syntax highlighting (via the same library as bat), native side-by-side diff mode, line number support, hyperlinks, and is actively maintained. diff-so-fancy's main advantage is that it's a pure shell script with no binary dependency. Most developers who try both prefer delta.

How do I choose a delta theme?▼

Run 'delta --list-syntax-themes' to see all available themes (they come from bat's theme list). You can preview themes by running 'delta --show-syntax-themes'. Popular choices include Dracula, GitHub (light-friendly), Nord, OneHalfDark, and TwoDark. Set your choice with 'syntax-theme = ThemeName' in the [delta] section of .gitconfig. You can also set 'dark = true' or 'light = true' to toggle delta's UI chrome independently from the syntax theme.

Can I use delta without git, for regular diff files?▼

Yes. delta reads from stdin and outputs to stdout, so you can pipe any diff output through it: 'diff -u file1.txt file2.txt | delta'. You can also pass delta a patch file directly: 'delta < my.patch'. This makes it useful for reviewing any unified diff format, not just git diffs.

Does delta work on Windows?▼

Yes. Install delta via Cargo ('cargo install git-delta'), Scoop ('scoop install delta'), or download a binary from the GitHub releases page. Configure .gitconfig the same way as on macOS/Linux. Delta works in Windows Terminal, PowerShell, and Git Bash.

Share this tool: X / Twitter LinkedIn
✓ 60,000+ developers use DevPlaybook ★★★★★ 4.8 / 5 on Gumroad ✓ MIT licensed · Instant download ✓ No login required

Related Products

on Gumroad

You Might Also Need

More Free Tools

Enjoying this tool? Get more like it.

Weekly developer tool guides, productivity playbooks & AI tricks. Free. No spam.

DevPlaybook Pro 7 days free

Unlock AI-Powered Dev Tools

  • ⚡ AI Code Review, Doc Generator & SQL Builder
  • ⚡ All premium templates & early access
  • ⚡ Member discounts on Gumroad products
Start Free Trial →

$9/mo after trial · Cancel anytime

Want the full toolkit?

Get DevPlaybook Pro

Every template, guide, boilerplate, and automation script in one bundle. 13 premium products — grab them all at once and save big.

$79
$241 separately Save $162 (67% off)
Get DevPlaybook Pro — $79 →

MIT licensed · Instant download · No subscription

See what's included → Browse all deals →