Git Tips Slides
PageUp x2: previous · PageDown x2: next · Home: index

git diff via Pager, not IDE

I use pager delta, which shows git diff output with better colors, so small changes in long lines are easier to spot.

I usualy do not use the git features of the IDE (vscode in most cases).

Depending on your system, the package is often called git-delta, but the executable is called delta.

Examples:

brew install git-delta
dnf install git-delta
cargo install git-delta
nix profile add nixpkgs#delta

Then configure Git to use it as pager:

[core]
    pager = delta

[interactive]
    diffFilter = delta --color-only

[delta]
    navigate = true

After that, commands like git diff, git show, git log -p, and git add -p will use delta.

Screenshot:

delta screenshot