Sometimes there is too much whitespace and tabs in my last commit.
In former times I used a VisualStudio-plugin, but this is not helpful there. So I wrote a small script (see on my github) which:
• replaces all tabs with four spaces
• removes all trailing whitespace
• converts line-endings to CRLF
I invoke it on the list of all changes files in my last commit in the git-repo with:
$ git diff --name-only HEAD~1 HEAD | xargs -L1 ../removeTrailing.sh
(first part gives you a list of changed files and then feeds it to the script for execution)