The proper way to get LF endings in Windows is to first set core.autocrlf to false:
git config --global core.autocrlf false You need to do this if you are using msysgit, because it sets it to true in its system settings.
Now git won’t do any line ending normalization. If you want files you check in to be normalized, do this: Set text=auto in your .gitattributes for all files:
- text=auto And set core.eol to lf: