Skip to content

Instantly share code, notes, and snippets.

@ksenzee
Created February 24, 2016 20:11
Show Gist options
  • Save ksenzee/d0e34813b8246debd849 to your computer and use it in GitHub Desktop.
Save ksenzee/d0e34813b8246debd849 to your computer and use it in GitHub Desktop.
Bash function to exclude files named *.info from a git diff.
git-diff-no-info ()
{
git diff `git status -s | grep -v ^\ D | grep -v info$ | cut -b4-`
}
@chx
Copy link

chx commented Feb 24, 2016

git diff `git diff HEAD --name-only --pretty="format:"|grep -v \.info$`

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment