Reputation: 3114
I want to check trailing white space errors between two git commits and the following commands works fine for me:
git diff ${prev_commit_ID}..${current_commit_ID} --check --relative
Please help me to modify this command to exclude some file types such as *.txt, *.pl, *.groovy etc.
Upvotes: 1
Views: 712
Reputation: 30888
git diff ${prev_commit_ID}..${current_commit_ID} --check --relative -- . ':!*.txt' ':!*.pl' ':*.groovy'
.
means all the files under the directory.
:!*.txt
exclude .txt
files.
Upvotes: 1