Favicon of Delta

Delta

Delta is a Rust-based pager for git, diff, grep, and blame output with syntax highlighting, side-by-side view, and themes.

Delta website screenshot
Delta GitHub repository preview

Delta is a syntax-highlighting pager written in Rust that sits between git (or diff, grep, blame) and your terminal. It reformats plain diff and grep output into something readable, with color, line numbers, and word-level highlighting. It's built for developers who spend a lot of time reading diffs in the terminal and want that experience to be less painful without switching to a GUI diff tool.

Key features

  • Syntax highlighting: uses the same highlighting themes as bat, so diffs show language-aware coloring instead of plain red/green text.
  • Word-level diff highlighting: uses a Levenshtein edit-inference algorithm to highlight the exact characters that changed within a line, not just whole lines.
  • Side-by-side view: shows old and new versions in two columns with automatic line-wrapping for long lines.
  • Line numbering: adds line numbers to diff output, on by default in side-by-side mode.
  • Navigation keybindings: n and N jump between files and diff hunks in large diffs or log -p output.
  • Merge conflict display: reformats conflict markers into a more readable layout.
  • Git blame formatting: adds syntax highlighting to blame output, with optional hyperlinks to commits on GitHub, GitLab, SourceHut, or Codeberg.
  • Grep highlighting: syntax-highlights output from rg, git grep, and plain grep.
  • Move detection: supports Git's --color-moved feature for tracking moved code blocks.
  • Copy-friendly diffs: strips leading -/+ markers by default so code can be copy-pasted directly.
  • Emulation modes: can mimic diff-highlight and diff-so-fancy output styles.
  • Terminal hyperlinks: commit hashes and file paths can be turned into clickable links.
  • Stylable elements: over 20 diff components (headers, decorations, line numbers, etc.) can be styled using git's own color/style syntax.
  • Unified diff support: works with plain diff output as well as git's native diff format.
  • Auto light/dark detection: picks a light or dark color scheme based on terminal background automatically.

Ideal use cases

Delta fits developers who work in the terminal and use git diff, git show, git log -p, git blame, or git grep regularly and want clearer, faster-to-scan output. It's a good match if you already use bat for file viewing and want a consistent look for diffs, or if you review a lot of pull requests locally via CLI before pushing comments elsewhere. It also helps with merge conflict resolution by making conflict markers and sections easier to distinguish visually.

It is not a full diff GUI: there's no visual merge editor, no built-in file tree browser, and no web interface. If you need a graphical three-way merge tool or an IDE-integrated diff viewer, delta isn't a replacement for those. It's also strictly a pager/formatter, it doesn't change how git computes diffs, it just changes how the output is displayed.

Installation

Install the package (named "git-delta" in most package managers; the executable itself is delta) through your platform's package manager, following the instructions on the installation page.

After installing, configure git to use delta as its pager by editing ~/.gitconfig:

[core]
    pager = delta

[interactive]
    diffFilter = delta --color-only

[delta]
    navigate = true  # use n and N to move between diff sections
    dark = true      # or light = true, or omit for auto-detection

[merge]
    conflictStyle = zdiff3

Or set the same options via command line:

git config --global core.pager delta
git config --global interactive.diffFilter 'delta --color-only'
git config --global delta.navigate true
git config --global delta.dark true  # or delta.light true, or omit for auto-detection
git config --global merge.conflictStyle zdiff3

For the full list of options, including side-by-side view, line numbers, and syntax themes, run delta -h for a short summary or delta --help for the complete manual. The online user manual covers every feature with examples and configuration snippets.

Frequently asked questions

Share:

Stars
32.5K
Forks
601
Last commit
12 hours ago
Repository age
7 years
License
MIT
Self-hosted
No
Activity score
81/100
View Repository
Ad
Favicon

 

  
 

Similar to Delta

Favicon

 

  
 
Favicon

 

  
 
Favicon