Git add. There is a warning

after each git add. , there is the following prompt

warning: LF will be replaced by CRLF in public/js/ylaravel.js.
The file will have its original line endings in your working directory

translated as

:lfpublic/js/ylaravel.jscrlf

but I still don"t know what it means

somebody give me some advice

Apr.21,2022

  1. first of all, LF is the newline character under UNIX/Linux and CRLF is the newline character under DOS/Windows.
  2. Git provides a "newline automatic conversion" feature, which is in automatic mode by default.
  3. you can modify the global configuration of Git to disable this feature: git config-- global core.autocrlf false


Please refer to this article: stackoverflow


my usual method is Manually set the newline format to CRLF

image.png

image.png

reference
Menu