Is it somehow possible to ignore certain files during git diff? I’m specifically interested in filtering out Makefile.in, Makefile, configure (and all that auto-generated crap).
Is it somehow possible to ignore certain files during git diff? I’m specifically interested
Share
You can try passing a list of files to
git diff, and it will execute the diff only on those files.Depending on how your code is setup, it can be as easy as:
or as unsightly/complex as:
Depending on whether the files you want to ignore are managed by Git in the current branch or not, you’ll need to replace the
git ls-fileswith afind *; use instead afind .and add|.gitto the Perl expression.Tailor this as you see fit, possibly using the directories / file names you know you’d like to diff, rather than using the
git ls-filesorfind.