NOTE: Do not do the following steps without commiting your data. As it clears all the git cache and it will clear all your changes in your project.
-
First disable the autoCRLF in the git config by running the following command in your terminal
git config core.autocrlf false
-
Then remove the cached files in the git. Run the following command:
git rm --cached -r .
-
Then reset the project files by executing the following command to complete conversion.
git reset --hard
That's it now all the files that have CRLF will be converted to LF.
Additionally you can add "files.eol": "\n"
in your Vscode settings.