When gits give me the warning: LF will be replaced by CRLF

I have had this problem for a few years now, it have been annoying, and in some sense you can say that it have been destructive, because it taught me to ignore the warning I get in my git console when committing. In many ways, you can say that this is really dangerous, because at some point, there will come a warning that I have to take serious, and I simply wont see it, because I am ignoring all warnings.

The reason for this problem, is that multiple people are working on the same project, and I am also working on my Mac to do iOS builds of my games. Multiple of the applications that are being used, change some of the line endings. I have on multiple occasions tried to fix this, by setting everything up in the same way, so that they would all use the same line endings, but to no avail. Someone somewhere will always do something different, and Unity itself will do some stuff to the line endings, so it appears that I cannot get a proper solution to this problem.

What I found out, is that the best way to solve this, is to simply set git to ignore this warning, and get on with it.

I do this with the following global command.

git config --global core.safecrlf false

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.