I am using Git under Windows to check in some files. I received warning like
LF will be replaced by CRLF in foobar
what does this warning mean? Can I do something to prevent this warning.
That is related to core.autocrlf
option. Manual says this:
core.autocrlf
Setting this variable to "true" is almost the same as setting the
text attribute to "auto" on all files except that text files are
not guaranteed to be normalized: files that contain CRLF in the
repository will not be touched. Use this setting if you want to
have CRLF line endings in your working directory even though the
repository does not have normalized line endings. This variable can
be set to input, in which case no output conversion is performed.
Git warns you that he changed line terminators for you.
I recommend to set global policy for the project (like "always use unix line ends" or vice versa) and disable this option. Things get messy sometimes and commit diffs then contain a lot of extra whitespace changes.
msysgit default system config is core.autocrlf = true
, which means CRLF conversion is ON.