how to use git diff -G to exclude certain patterns

Viewed 86

I would like to ignore certain changes when using git diff (version bumps). I saw there is a -G flag; however, I don't seem to have any luck with it. I also saw a reference here, but that doesn't seem to help.

I am hoping to do something like this: git diff <hash> --unified=0 -G "^.*\<version\>.*"

I would expect this to include anything with in it; however, that doesn't happen. It seems to make no difference. I'd like to invert it if possible, but I think getting a basic regex is step 1.

0 Answers
Related