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.