Reputation: 813
I have an autosetting for Windows somewhere (CRLF) which is really annoying, is there a way to change this to Unix?
Upvotes: 54
Views: 65725
Reputation: 6554
Two things to do:
To change all line endings from CRLF
to LF
on a Windows machine for a cloned repository. From the repository root folder, run:
git config core.autocrlf false
git rm --cached -r . # Don’t forget the dot at the end
git reset --hard
git status
Using Windows-installed Github Desktop is not a good idea if using WSL. It seems there's quite a delay in reading between the Windows install and WSL files. So, it is better to just use source control features built into VSCode with the helpful WSL integration extension.
Upvotes: 0
Reputation: 983
eol
in settings and click on \n
to make LF default.Upvotes: 90
Reputation: 2952
Open VS code window then Ctrl+Shift+P to open settings and search for EOL like @David Bakare suggested above.
Upvotes: 4