diff-so-fancy reformats git diff and unified diff output for easier reading. Install it on your PATH or configure git to pipe diffs through it.
Overview
diff-so-fancy is a command-line formatter that turns dense machine-oriented diffs into clearer text for review. The goal is to make changes easier to read while scanning patches or pull requests.
You can wire it into git so every diff uses the tool via pager settings, or pipe unified diff output manually with the diff -u flag. Recursive diff mode with -r or --recursive is supported.
Formatting options control empty-line highlighting, simplified hunk headers, stripping leading plus and minus markers, Unicode or ASCII ruler lines, ruler width, boxed file headers in git show, shorter single-line headers, and optional integration with sem summaries.
Distribution paths include copying the script from releases, npm, Homebrew, Fedora and Arch packages, and a Debian or Ubuntu PPA. Packaging issues are handled by those downstream channels when applicable.
Key features
- Reformats git diff output
- Pipes unified diff input
- Simplified hunk header lines
- Optional Unicode ruler lines
- Configurable file name boxes
- Strip leading plus and minus signs
- Recursive diff support
- Tunable empty-line highlighting
Use cases
- Reading git diffs in the terminal
- Code review in the shell
- Comparing files with diff -u
- Custom git pager setup