explaingit

so-fancy/diff-so-fancy

Analysis updated 2026-06-24

18,017PerlAudience · developerComplexity · 1/5Setup · easy

TLDR

A tool that makes git diff output much easier to read by reformatting it with cleaner visuals and highlighting exactly which words changed on each line.

Mindmap

mindmap
  root((diff-so-fancy))
    What it does
      Better git diff view
      Word-level highlights
      Cleaner file headers
    How to use
      Git pager config
      Pipe from diff
      Recommended colors
    Installation
      npm
      Homebrew
      Nix
      Scoop
    Audience
      Git users
      Developers
Click or tap to explore — scroll the page freely

Code map

Detail Auto

An interactive map of this repo's files and how they connect — its source is parsed live in your browser. Click Visualize to build it.

filefunction / class

What do people build with it?

USE CASE 1

Replace the default git diff display with a cleaner word-level highlighted view in your terminal.

USE CASE 2

Configure git to use diff-so-fancy automatically so every git diff, git show, and similar command looks better.

USE CASE 3

Pipe any standard diff command through diff-so-fancy to see a reformatted, more readable version.

USE CASE 4

Review code changes faster by seeing exactly which words changed rather than entire modified lines.

What is it built with?

Perl

How does it compare?

so-fancy/diff-so-fancybrendangregg/flamegraphaldanial/cloc
Stars18,01719,47322,970
LanguagePerlPerlPerl
Setup difficultyeasymoderateeasy
Complexity1/53/51/5
Audiencedeveloperops devopsdeveloper

Figures from each repo's GitHub metadata at analysis time.

How do you get it running?

Difficulty · easy Time to first run · 5min

In plain English

diff-so-fancy is a tool that makes the output of git diff, the command that shows what changed between versions of code, much easier for humans to read. By default, git diff shows changes as plain text with plus and minus signs at the start of each line, which can be hard to scan quickly. diff-so-fancy reformats this output with cleaner visual styling, removes the leading symbols, simplifies the file header lines, and highlights the specific words that changed within each line rather than just marking the entire line. You configure it by telling git to use diff-so-fancy as its "pager" (the program that displays output). After that, it works automatically whenever you run git diff, git show, or other diff-generating commands. The readme also provides recommended color settings that improve contrast for the highlighted portions. diff-so-fancy can also be used independently of git by piping the output of the standard diff command through it. It is a Perl script that can be installed from its source repository, through package managers including npm, Homebrew, Nix, Scoop, and others, or from Linux distribution repositories.

Copy-paste prompts

Prompt 1
How do I configure git to use diff-so-fancy as my default pager so it activates automatically every time I run git diff?
Prompt 2
What git config color settings should I add to get the best-looking output from diff-so-fancy with good contrast?
Prompt 3
I'm on macOS, what is the fastest way to install diff-so-fancy using Homebrew?
Prompt 4
Show me how to pipe a regular diff command through diff-so-fancy from the terminal to see the reformatted output.
Prompt 5
How do I use diff-so-fancy when reviewing a specific commit with git show so the output is easier to scan?

Frequently asked questions

What is diff-so-fancy?

A tool that makes git diff output much easier to read by reformatting it with cleaner visuals and highlighting exactly which words changed on each line.

What language is diff-so-fancy written in?

Mainly Perl. The stack also includes Perl.

How hard is diff-so-fancy to set up?

Setup difficulty is rated easy, with roughly 5min to a first successful run.

Who is diff-so-fancy for?

Mainly developer.

Open on GitHub → Explain another repo

This repo across BitVibe Labs

Scan in gitsafehub Deploy in gitdeployhub so-fancy on gitmyhub

Verify against the repo before relying on details.