The proper way to get the end of line sequencies to be LF under Windows system is to first set core.eol
to lf
.
core.eol
git config --global core.eol lf
core.autocrlf
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.
Comments