Configure Git
I have just started working with WSL under Windows 10. Coming from *nix (primarily macOS), the WSL is very appealing to me and the lack of a proper *nix toolchain, what drove me away back in the day. But now I am back and attempting to get everything to work smoothly.
WSL 1
The recommendation is to set core.autocrlf
to false
, based on the blog post by Pete O’Shea.
This has somewhat worked for me on WSL1
$ git config --global core.autocrlf false
You can checkout the value using:
$ git config --list --show-origin
...
file:/home/jonasbn/.gitconfig core.autocrlf=false
...
WSL 2
For me it has always made sense to have core.autocrlf
set to true
, which contradicts the section above based on the blog post by Pete O’Shea.
$ git config --global core.autocrlf true
You can checkout the value using:
$ git config --list --show-origin
...
file:/home/jonasbn/.gitconfig core.autocrlf=true
...