Skip to content

diff-so-fancy

A script that makes git and plain diff output easier for humans to read.

Stars
18.1k
Forks
350
Licence
MIT
Language
Perl
Last update
18 days ago
Type
CLI

What it is

diff-so-fancy is a command-line script that reformats the text output of diff tools, including git diff, so changes are easier to scan. It adds color, simplifies headers, and hides the leading + and - symbols, which helps you spot mistakes faster. You plug it into git as a pager or diff filter, or pipe ordinary diff output into it.

  • Set git's core.pager so every git diff and git show output is formatted
  • Pipe a unified diff from diff -u into diff-so-fancy to read it more easily
  • Compare folders recursively with diff --recursive -u and format the result
  • Customize colors-free output options such as ASCII rulers or shorter headers via git config

Great for

  • Developers who review many diffs in the terminal
  • People who use git from the command line and want clearer output
  • Users who want a simple drop-in change with no complex setup
  • Anyone reviewing changes made with plain diff -u

Not ideal for

  • People who do not use a terminal or command-line git, since it only formats text output
  • Users who want syntax-aware or structural diffs, because the README describes only line-based formatting
  • Anyone who needs the exact raw diff text, since the symbols and headers are changed for display
Step-by-step guide: how to use diff-so-fancyInstall, first run, examples, tips and FAQs

How to get it

  1. 1

    Download the app

    You'll need: Perl (the project is written in Perl)

    Clone the repository (for development features)

    git clone https://github.com/so-fancy/diff-so-fancy

    Set git to use diff-so-fancy as the pager

    git config --global core.pager "diff-so-fancy | less --tabs=4 -RF"

    Set git to use diff-so-fancy for interactive patch mode

    git config --global interactive.diffFilter "diff-so-fancy --patch"
  2. 2

    Run it

    • Copy the diff-so-fancy script from the latest GitHub release into a folder on your PATH
    • Run the git config command for core.pager shown in the README
    • Run git diff in any repository to see the formatted output
    • Optionally run diff -u file_a file_b | diff-so-fancy to test it on plain files
  3. 3

    Get the most out of it

    • Turn off features you do not want with git config --bool --global diff-so-fancy.<option> false, such as markEmptyLines or useUnicodeRuler
    • Set diff-so-fancy.rulerWidth to a fixed number for consistent ruler lines
    • Use diff-so-fancy.shortHeaders true for one-line file headers
    • Read the project's pro-tips document linked from the README for advanced usage

Downloads

Strengths

  • Simple to install: the README says copying one script into your PATH is enough
  • Configurable through several git config options with documented defaults
  • Works with both git and standard diff output

Trade-offs

  • The README describes several installation routes, and packaging problems must be reported to those package maintainers
  • Some features, like semIntegration, depend on a separate tool named sem
  • Only the README was reviewed here, so behavior on edge cases is not verified

How it compares

ProjectStarsTypeLevelUpdatedBest for
diff-so-fancy (this)18.1kCLIbeginner18 days agoDevelopers who review many diffs in the terminal
delta32.6kDev toolbeginner9 days agoDevelopers who read a lot of git diffs or git show output in the terminal
lazygit83.6kCLIbeginner6 days agoDevelopers who already use git from the command line and want a faster overview of their repository
difftastic26.1kCLIbeginner4 days agoDevelopers reviewing code changes in git where reformatting adds noise
cli46.8kCLIbeginner6 days agoDevelopers who already work in the terminal and use GitHub daily
gitleaks30.6kCLIbeginner9 days agoDevelopers who want to catch accidentally committed credentials before they reach a shared repository

Stats synced from GitHub. The assessment above was drafted with AI from the project's README on 2026-10-29 and may miss recent changes — check the README before relying on a command. MIT licence: free to use, modify and distribute, including commercially, as long as you keep the copyright notice.