diff-so-fancy
human-readable git diff formatter
TLDR
Pipe git diff through diff-so-fancy
SYNOPSIS
diff-so-fancy [options]
DESCRIPTION
diff-so-fancy transforms git diff output into a more human-readable format. It improves the visual presentation of diffs with better line highlighting, cleaner headers, and removed chunk markers.
The tool uses terminal colors effectively to highlight what changed within lines, making code reviews faster and easier. It's designed as a git pager replacement.
PARAMETERS
--patch
Use patch-compatible output mode.--no-colors
Disable color output.--colors
Enable color output.--set-defaults
Configure git to use diff-so-fancy.
CONFIGURATION
~/.gitconfig
Git configuration for integrating diff-so-fancy as the default pager.
GIT CONFIGURATION
git config --global color.ui true
git config --global color.diff-highlight.oldNormal "red bold"
git config --global color.diff-highlight.oldHighlight "red bold 52"
git config --global color.diff-highlight.newNormal "green bold"
git config --global color.diff-highlight.newHighlight "green bold 22"
CAVEATS
Requires Perl. Modified output not suitable for patch application. Some themes may need color adjustment. Large diffs may be slower.
HISTORY
diff-so-fancy was created by Seth Vargo and is maintained by so-fancy. It emerged from the desire for better diff visualization in terminals, building on git's diff-highlight script with additional formatting improvements.
