trailing whitespace git apply

C++
git apply --reject --whitespace=fix mychanges.path
Source

Also in C++: