I have an autosetting for Windows somewhere (CRLF) which is really annoying, is there a way to change this to Unix?
4 Answers
3 Comments
settings.json should now read: ` { "files.eol": "\n" } `Open VS code window then Ctrl+Shift+P to open settings and search for EOL like @David Bakare suggested above.
1 Comment
Two things to do:
To change all line endings from
CRLFtoLFon a Windows machine for a cloned repository. From the repository root folder, run:# Make sure you have committed any important local changes first git config core.autocrlf false git rm --cached -r . # Don’t forget the dot at the end git reset --hard git statusUsing 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.
5 Comments
git reset --hard doing here?You can also set this on a path using a .gitattributes file
https://git-scm.com/docs/gitattributes
.devcontainer/.zshrc text eol=lf .devcontainer/.p10k.zsh eol=lf 
eolin the settings. There is a default setting there.{ "files.eol": "\n" }insettings.json