Skip to content

Instantly share code, notes, and snippets.

@benoittgt
Created April 7, 2020 14:21
Show Gist options
  • Save benoittgt/5a6193ce3afba4015f9eb70adffe129d to your computer and use it in GitHub Desktop.
Save benoittgt/5a6193ce3afba4015f9eb70adffe129d to your computer and use it in GitHub Desktop.
Show only add + deletion with specific content with Git and Grep
git diff -U0 HEAD\~1..HEAD | \
grep -v '^@@ ' | \
grep -v '^-[[:blank:]]*$' | \
grep -B1 -E '^(-[^-]|\+[^+])[^ Generated]'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment