5

When I try to push to GitHub, everytime I keep getting such warnings:

warning: LF will be replaced by CRLF in app/bingey-api/models/user.js.
The file will have its original line endings in your working directory

Even though I changed my line endings setting to "/n" in these places:

User -> Text Editor -> Files -> Eol:

enter image description here

Also Workspace -> Text Editor -> Files -> Eol:

enter image description here

Also my ESLint options file has default line ending "\n":

enter image description here

And Prettier is also configured to default "\n" endline symbol:

enter image description here

This is weird, maybe someone knows where else should I change settings? Thank you.

vytaute
  • 1,260
  • 4
  • 16
  • 36
  • 1
    You should maybe have a look at your git core.autocrlf parameter. I don't think this is related to your vs code configuration. You can read [this](https://stackoverflow.com/questions/3206843/how-line-ending-conversions-work-with-git-core-autocrlf-between-different-operat). – aTom Mar 19 '21 at 06:37
  • Thank you, this parameter was set to false. Setting it to true fixed my issue. Look at question update for more info. – vytaute Mar 19 '21 at 10:07

1 Answers1

1

FOUND SOLUTION:

In VS Code go to Terminal -> New Terminal and try to look what is the value of your core.autocrlf parameter like that:

 git config --global --get core.autocrlf  

If nothing shows it means that it is set to default value (which is false) Otherwise, set it to false:

 git config --global core.autocrlf false
vytaute
  • 1,260
  • 4
  • 16
  • 36