I have a number of text files and from time to time I start up a tool that removes the trailing white space. Is it possible to use git apply --whitespace=fix
for that purpose (and get rid of the other tool I was using)?
I tried something like git apply --whitespace=fix testfile.txt
but that did not work,
I guess it only works on patch files, but I want to use it with any kind of text files.
I do not want to run the command on every check-out or commit (there are some answers doing that), I just want to run it manually from time to time and if I like the output, I will commit it, separately from changes to the content.