viernes, febrero 06, 2015

Git line endings in windows

Git was changing my line endings in my Visual Studio solutions. Specially the line endings of the files in the packages folder. I turned off clrf,   with git config --global core.autocrlf false, but it did not work. I have tried several things. But I could not find how to prevent that git not change the line endings of the files I did not touch.
Finally here is the solution:

git config --global core.autocrlf true
git config --global core.safecrlf true

Safecrlf must be in true!