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.
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
- Syntax highlighting — colors added/removed lines by language using bat's Syntect-based highlighting
- Side-by-side diffs — view old and new versions in parallel columns instead of interleaved
- Line numbers — show original and new file line numbers in the margin
- Theme support — dozens of themes (Dracula, Nord, GitHub, OneHalfDark, and more)
- Navigate mode — use 'n' / 'N' to jump between diff sections like a search result
- Hyperlinks — clickable file paths in terminals that support OSC 8 hyperlinks
- diff-so-fancy integration — can mimic diff-so-fancy style for a gradual migration
- git blame — enhanced blame output with syntax highlighting and configurable layout
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 |
|---|---|---|
| Implementation | Rust binary | Shell script (Perl) |
| Syntax highlighting | Yes (Syntect) | No |
| Side-by-side diffs | Yes | No |
| Line numbers | Yes | No |
| Navigate mode | Yes | No |
| No binary dependency | Requires binary | Shell script only |
| Performance | Excellent (Rust) | Good |
| Active maintenance | Yes | Slowing |
Use Cases
- Reviewing pull request diffs locally before pushing
- Code review sessions in the terminal for remote servers without GUI access
- Improving readability of
git log -pfor understanding change history - Reviewing patch files from email-based Git workflows
- Enhancing
git add -pinteractive staging with highlighted hunks
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.
Related Products
on GumroadDeveloper Productivity Bundle
Stop rebuilding the same setup every project. 51 VSCode snippets, 40 Git aliases, 5 Docker Compose stacks, 5 GitHub Actions workflows, 5 README templates, and a dotfiles kit. Set up a professional dev environment in under an hour.
Buy on Gumroad →Developer Cheat Sheet Bundle
10 print-ready cheat sheets for the tools developers use every day: Git, Docker, Linux CLI, SQL, Regex, HTTP Status codes, VS Code shortcuts, Bash scripting, jq/JSON, and Markdown.
Buy on Gumroad →Developer Productivity Toolkit
Complete dev environment setup: VS Code settings, keybindings, snippets, shell aliases, Git hooks, tmux config, and Starship prompt. Copy, paste, code faster.
Buy on Gumroad →You Might Also Need
Git Stash Manager
Visual reference for git stash commands. Copy-ready stash push, pop, apply, drop, list, and branch commands with stash index control. Free git stash cheat sheet.
Open free tool →
Git Cheatsheet Interactive
Searchable, interactive Git cheatsheet with 50+ commands. Filter by category, copy commands instantly. Covers setup, staging, branching, remotes, history, undo, and tags. Free.
Open free tool →
Git Command Builder
Build complex Git commands visually step by step. Select from commit, push, pull, branch, merge, rebase, stash, and more. Generate accurate Git CLI commands with all common options. Free online tool.
Open free tool →
More Free Tools
Related Articles
Aider AI: The Ultimate Terminal-Based AI Coding Assistant for 2026
Complete guide to Aider AI coding assistant. Setup, best practices, model options, and how this terminal-based tool compares to GUI editors for serious developer workflows.
Git Workflow Best Practices 2025: Team-Proven Strategies
Git workflow best practices for 2025: branching strategies, commit conventions, PR reviews, rebasing vs merging, and CI/CD integration that teams actually use.
20 Best CLI Tools Every Developer Needs in 2026
The definitive list of CLI tools that actually improve developer productivity in 2026: navigation, file ops, search, git, system monitoring, terminal setup, and dev utilities — with install commands and real usage examples.
Advanced Git Workflows in 2026: Worktrees, Bisect, Interactive Rebase, and More
Master advanced Git workflows that most developers never use. Git worktrees for parallel branches, git bisect for hunting bugs, interactive rebase for clean history, sparse checkout for monorepos, and power-user config tips.
Git Branching Strategies Compared 2026: GitFlow vs Trunk-Based vs GitHub Flow
Compare the top Git branching strategies for 2026 — GitFlow, GitHub Flow, Trunk-Based Development, and GitLab Flow. Choose the right workflow for your team's size, release cadence, and CI/CD setup.
Enjoying this tool? Get more like it.
Weekly developer tool guides, productivity playbooks & AI tricks. Free. No spam.
Unlock AI-Powered Dev Tools
- ⚡ AI Code Review, Doc Generator & SQL Builder
- ⚡ All premium templates & early access
- ⚡ Member discounts on Gumroad products
$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.
MIT licensed · Instant download · No subscription
See what's included → Browse all deals →