I want to remove trailing whitespace from my modifications to files.
However, this is different than this or this because I want to do it whenever, without committing.
For example,
- Remove trailing whitespace.
git diff
- Review code with another programmer.
git commit
But I don't want to remove trailing whitespace from lines I didn't modify, so this won't work for me either.