Remove all trailing whitespace in Sublime Text 2
I switched my code editor to remove trailing whitespace upon save. It's fantastic to not have to worry about it.
Preferences > Settings > Create trim_trailing_white_space_on_save": true
It is SO annoying when you change one line in a file but all the other trailing whitespace gets removed so the whole file looks like it changed.
Remove all the trailing whitespace at once
ack --print0 -l '[ \t]+$' | xargs -0 -n1 perl -pi -e 's/[ \t]+$//'
Remove it at once and make one big commit.