git提交的时候报错The file will have its original line endings in your working directory解决办法

报错如下:

The file will have its original line endings in your working directory
warning: LF will be replaced by CRLF in ceph-csi/deploy/rbd/kubernetes/csi-provisioner-rbac.yaml.

原因:

是从别人的GitHub上下载下来的,想提交到的自己的git就会报错

解决办法:

git rm -r --cached .
git config core.autocrlf false

然后在重新add,重新提交即可

发表评论

后才能评论