问题场景:

代码完成,vscode终端中执行【git add .】准备提交代码,出现如标题警告,截图如下:

LF will be replaced by CRLF in package.json.

 

 

解决办法:

在工程目录下添加 .gitattributes 文件,文件内容为: 

package.json text eol=lf

package-lock.json text eol=lf

1 #在工程目录下添加 .gitattributes 文件,文件内容为:
2  
3 package.json text eol=lf
4 package-lock.json text eol=lf

 

囫囵吞枣,不知所以,望大佬赐教!

 

相关文章:

  • 2021-05-19
  • 2021-07-27
  • 2022-01-18
  • 2022-12-23
  • 2021-12-19
  • 2021-05-18
  • 2022-12-23
猜你喜欢
  • 2022-01-17
  • 2021-08-13
  • 2022-12-23
  • 2021-11-04
相关资源
相似解决方案