git提交中的索引错误问题

在使用git中发现每次提交更改时会有:索引错误问题

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

warning: LF will be replaced by CRLF in main.py.
The file will have its original line endings in your working directory

原因在于window下的换行符为\r\n,而Linux下的换行符为\n,具体可见参考网页。

参考
理解 CRLF,LF

posted @ 2019-03-22 12:25  bitbitbyte  阅读(1354)  评论(0)    收藏  举报