Expected linebreaks to be 'LF' but found CRLF

Note - Make sure you don't have any uncommitted changes else it will be deleted when you run the following cmd!

Run this in your terminal or cmd prompt

git config core.autocrlf false
git rm --cached -r .
git reset --hard

This usually happens when the project is created on UNIX based system & then used on a windows system because both have different line endings.

We need to disable auto CRLF on git & uncommit & recommit changes.

Reference


You can set the default end of line character in VSCode under File > Preferences > Settings > Files:Eol