Skip to content

Instantly share code, notes, and snippets.

@cam8001
Last active December 20, 2023 19:40
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save cam8001/7301869 to your computer and use it in GitHub Desktop.
Save cam8001/7301869 to your computer and use it in GitHub Desktop.
Use nice word-level highlighting in git.
#!/bin/bash
# See https://github.com/git/git/tree/master/contrib/diff-highlight
export PATH=$PATH:$(brew --cellar git)'/'$(git --version | sed 's/git version //')/share/git-core/contrib/diff-highlight
# Add this to your gitconfig.
[pager]
log = diff-highlight | less
show = diff-highlight | less
diff = diff-highlight | less
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment