The proper way to get the end of line sequencies to be LF under Windows system is to first set core.eol to lf.


git config --global core.eol lf


Now you can set core.autocrlf to false or input.

git config --global core.autocrlf false

Stop converting LF endings into CRLF when you check out code.

git config --global core.autocrlf input

Any CRLF ending will be converted to LF in checkouts.

Fix current Repository

To fix current repository you have already checked out, you can run the following commands to fix it:

git rm -rf --cached .
git reset --hard HEAD

More information you can also take a look at configration on Git official site.

Last modified: December 12, 2019



Write a Reply or Comment

Your email address will not be published.