C.W.K.
Stream
Lesson 04 of 08 · published

delta: Git Diffs You Can Read

~8 min · delta, git, diff

Level 0Window Tourist
0 XP0/95 lessons0/14 achievements
0/100 XP to next level100 XP to go0% complete

The diff your eyes deserve

Default git diff is plain red/green with whole-line highlighting. delta upgrades it: side-by-side mode, syntax highlighting per language, line numbers, and word-level highlighting on changed lines.

Install and configure

brew install git-delta
git config --global core.pager delta
git config --global interactive.diffFilter 'delta --color-only'
git config --global delta.navigate true
git config --global delta.line-numbers true
git config --global delta.side-by-side true
git config --global merge.conflictStyle zdiff3

That single batch turns every git diff, git log -p, git show, and git add -p into syntax-highlighted joy.

Standalone use

diff -u old.txt new.txt | delta
delta old.txt new.txt

Drop-in for diff when you want a friendly view.

Themes

delta --show-config lists every option. Common picks: delta.features = decorations, delta.syntax-theme = Monokai Extended, delta.line-numbers = true. Themes ship with delta — try delta --list-syntax-themes to browse.

The wider lesson

Spend 30 seconds setting it up once, save 10 seconds on every git diff you read for years. Modern terminal life is compounding small upgrades like this.

Code

One-shot delta setup·bash
brew install git-delta
cat >> ~/.gitconfig <<'EOF'
[core]
  pager = delta
[interactive]
  diffFilter = delta --color-only
[delta]
  navigate = true
  line-numbers = true
  side-by-side = true
[merge]
  conflictStyle = zdiff3
EOF
git diff   # try it

External links

Exercise

Install delta and apply the global config. In any git repo, run git diff HEAD~1 and feel the difference. Try git log -p | head -100 and use n/N to jump between files.

Progress

Progress is local-only — sign in to sync across devices.
Spotted a bug or have feedback on this page?Report an Issue

Comments 0

🔔 Reply notifications (sign in)
Sign inPlease sign in to comment.

No comments yet — be the first.