天天看點

warning: LF will be replaced by CRLF in package-lock.json. The file will have its original line endi

warning: LF will be replaced by CRLF in package-lock.json.

The file will have its original line endings in your working directory.

  • 解決
  • 将core.autocrlf設為false即可解決這個問題,不過如果你和你的夥伴隻工作于Windows平台或者Linux平台,那麼沒問題,不過如果是存在跨平台的現象的話,還是需要考慮一下。

    但當 core autocrlf為true時,還有一個需要慎重的地方,當你上傳一個二進制檔案,Git可能會将二進制檔案誤以為是文本檔案,進而也會修改你的二進制檔案,進而産生隐患。

$ git config --global core.autocrlf true #最後這裡依據false,true,input