errickson.net
Back to Blog

Exclude files from git commands

#git #terminal

To exclude files from git commands such as git grep or git diff:

1
2
git grep foobar -- ':!*.java'
git diff -- ':!*.html' ':!abc.csv'

Works for whole folders as well.


Back to Blog