Platform: Windows 10 Editor: VSCode
Hi,
I am working on Windows using WSL and develop on VSCode. I notice that whenever I clone a project that contains Bash scripts into VSCode, these scripts are automatically converted to DOS format which means that I have to dos2unix these scripts before being able to use them.
For instance, if I clone this repo full of Bash scripts in VSCode, and check any script using the command dos2unix --info=u *, it returns 0 for every Bash scripts which means they are not Unix-formatted.
However, if I simply download the repo directly from GitHub and check the info of the scripts, it shows that they are actually Unix-formatted.
Is there a way to avoid this automatic conversion and simply clone the repo as it is?
I always start with
git config --global core.autocrlf false: that takes care of any autmomagic conversion (which would be done by default on all files)This is respected by VSCode.
Any eol conversion should be, as commented, done in a
.gitattributesfile if needed, as I wrote here: that way, even ifcore.autocrlfwas left to true, it would not convert those files.