Improving Git Diffs

Word-by-word diff highlighting.

Git diff, word-colored

Default git

Git diff, default
Long lines and repetition with default diff
GitHub word-coloring

Diff Highlighters

Long lines and repetition, default vs word-colored
# .gitconfig
# Use `diffr` (make sure it is installed).
log = diffr | less
show = diffr | less
diff = diffr | less

Syntax Highlighting

`delta` code diff
Diff with custom `delta` settings
Side-by-side diff (default settings)
# .gitconfig
# Use `delta`.
log = delta
show = delta
diff = delta

Other Alternatives

diff-highlight word-coloring
# .gitconfig
# Use `diff-highlight` (make sure it is in `$PATH`).
log = diff-highlight | less
show = diff-highlight | less
diff = diff-highlight | less

Final Words

Programming Languages, Tools, and Theory; Education, Types, ML, Math, and Games

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store