主警告:在git push上,LF将被CRLF消息替换

时间:2015-01-27 18:00:15

标签: git github

每当我从我的Windows机器上推送到github时,我都会看到这些消息:

C:\G\ab>git commit -m "Added new breadcrumb code"
[master warning: LF will be replaced by CRLF in WebUserApp/content/less/body.css.
The file will have its original line endings in your working directory.
warning: LF will be replaced by CRLF in WebUserApp/content/less/html-light.css.
The file will have its original line endings in your working directory.
warning: LF will be replaced by CRLF in WebUserApp/content/less/top.css.

有人可以告诉我是什么原因造成的,以及我如何解决问题(如果需要修复)。

1 个答案:

答案 0 :(得分:1)

您可以将git配置中的autocrlf选项设置为 false 输入

您可以在全局部分编辑.git/config文件时设置该选项,也可以使用git命令行

git config --global core.autocrlf false

https://help.github.com/articles/dealing-with-line-endings/
Why should I use core.autocrlf=true in Git?