git報錯:warning: LF will be replaced by CRLF in node_modules/serve-static/index.js. The file will have its original line endings in your working directory(已解決)

  • 891
  • 0
  • Git
  • 2020-11-09

warning: LF will be replaced by CRLF in node_modules/serve-static/index.js.
The file will have its original line endings in your working directory

 

 

git add .  時。會跳出警告訊息

這是換行符號的問題,Windows 的換行 和 Unix 下換行符號不一樣,git 預設會自動轉換,但是這樣會有問題

解決如下:

>>禁止自動轉換

git config --global core.autocrlf false

已解決

參考文獻:https://blog.csdn.net/leedaning/article/details/53024162

 

Yiru@Studio - 關於我 - 意如