更新Git索引失败,LF将被CRLF取代?

Ayu*_*yal 6 git github git-gui

我正在使用git-gui进行版本控制并将它们推送到远程位置.当我尝试重新扫描文件以进行更改时,我收到了此消息,我不确定这意味着什么.请帮帮我.

在此输入图像描述

Updating the Git index failed.  A rescan will be automatically started to resynchronize git-gui.

warning: LF will be replaced by CRLF in bin/jarlist.cache.
The file will have its original line endings in your working directory.
warning: LF will be replaced by CRLF in gen/com/click4tab/pustakalpha/BuildConfig.java.
The file will have its original line endings in your working directory.
warning: LF will be replaced by CRLF in proguard-project.txt.
The file will have its original line endings in your working directory.
warning: LF will be replaced by CRLF in project.properties.
The file will have its original line endings in your working directory.
warning: LF will be replaced by CRLF in res/layout/start_test.xml.
The file will have its original line endings in your working directory.
warning: LF will be replaced by CRLF in res/menu/start_test.xml.
The file will have its original line endings in your working directory.
warning: LF will be replaced by CRLF in src/com/click4tab/pustakalpha/StartTestActivity.java.
The file will have its original line endings in your working directory.
Run Code Online (Sandbox Code Playgroud)

小智 -3

这行代码应该可以防止出现此警告:

git config core.autocrlf false
Run Code Online (Sandbox Code Playgroud)

如果您想获得有关如何以及在何处输入该行代码的更详细答案,请查看此处:https: //stackoverflow.com/questions/3841140/git-how-to-get-rid-of-the-annoying-crlf -msysgit-windows 上的消息

  • 糟糕的建议,需要“autocrlf”来保持提交中的行结尾在平台上保持一致。您是否曾经尝试过解决冲突,其中实际上只有几行发生了变化,但它们隐藏在大量的行结尾“更改”中? (2认同)