Please can you explain about whitespace errors in git, what do they mean, what is 'squelching', and do I need to worry about it?
(Running msysgit, but with other users on linux).
There is already a 'definitive' answer for autocrlf here (set it to false git config --global core.autocrlf false
)
Squelching is initially a function used in telecommunication to set a threshold above which a signal is or isn't alllowed through.
In your case, when you see:
It means: instead of displaying 100+ error messages, it warns you it should have displayed those errors (but it won't, in order to not clutter the output)
I have no definitive recommendations for whitespace policy, except from identifying why they are introduced in the first place.
If your editor doesn't convert the eol (end of lines) characters between Window and Unix, then it means it somehow add or remove automatically whitespaces, which is not always useful.
A first test (as in this blog post) is to de-activate the policy:
or try
and see if that facilitates your rebase operations.
After searching for that answer as well and looking into both the git-config and git-apply manuals, I found that
deactivates showing the whitespace errors in your current repository.
To make it available for all the repositories just add
--global
like this:Here is how to fix "trailing whitespace" errors when using git apply :
The first thing you need to know is : what is a whitespace error. This is explained on the core.whitespace setting documentation. Basically, git handles several kind of whitespace errors :
trailing whitespace error can rise when patching a file using windows style line ending (CRLF). To avoid this warning, you can either ask
git apply
to not show warning :or you can edit git configuration on the fly (with
-c
) to say "ok git, CR at end of line are fine this time" :If you want to make it permanent, just edit the git configuration like that :
or :