Instead of diff: delta
Set delta as Git's pager to read diffs. It adds syntax highlighting, word-level change markers, line numbers and an optional side-by-side view to the output of git diff, git show and git log -p. diff itself still produces the patches; delta is how you read them.
Both are for reading the changes between two files or two commits.
Why delta is better
- Syntax highlighting uses the same themes as bat, so code in a diff reads like code.
- Word-level highlighting shows exactly which part of a changed line moved, not just that the line changed.
- A side-by-side view with line wrapping and line numbers is one setting away.
- n and N jump between files in a large diff, and merge conflicts and git blame are displayed more clearly.
- It also highlights grep output from rg, git grep and grep.
When to keep diff
Keep diff for producing patch files, for scripts, and for checking whether two files differ. delta reads diffs; it does not replace the tool that makes them. Plain git diff output is also what you paste into email patches and code review tools.
Switching
Install the package, usually named git-delta, and set core.pager to delta and interactive.diffFilter to delta --color-only in ~/.gitconfig. Add side-by-side = true under [delta] if you want it. Nothing changes in your repositories.
Watch out
delta changes only how diffs look, so copying from it into a patch file is not safe; use git diff --no-pager or git format-patch. Side-by-side needs a wide terminal. difftastic gives a truer picture of code changes but its output cannot be applied as a patch.
Also worth a look
- difftastic A structural diff that parses code with tree-sitter and ignores formatting-only changes; pick it when reformatting makes line diffs unreadable.
More newer, better command-line tools
Sources
Judged on 2026-11-06. See every command-line tools, or all 66 replacements.