Skip to content

Instantly share code, notes, and snippets.

@whatAboutJohn
Created January 18, 2016 19:15
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save whatAboutJohn/5ed12e888a6a08463d9b to your computer and use it in GitHub Desktop.
Save whatAboutJohn/5ed12e888a6a08463d9b to your computer and use it in GitHub Desktop.
Adds "dif" alias to git to enable text search of an unstaged file.
# Add this line to ~/.gitconfig in [alias].
dif = "!sh -c \"git diff $(git diff --name-only -- \"*$1*\")\""
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment