GIT 提交异常 fatal: LF would be replaced by CRLF

GIT 提交错误 fatal: LF would be replaced by CRLF

由于Unix 和 Windows 下对换行符的解释不同,提示为

fatal: LF would be replaced by CRLF

因为win下文件回车换行是以CRLF结尾,而用VIM编辑器新建的文件是以LF结尾,导致出现了此问题。

解决方法:

找到win项目的.git目录,修改config文件,在[core]配置项添加下面一句话,就ok了。

autocrlf = false

你可能感兴趣的:(GIT 提交异常 fatal: LF would be replaced by CRLF)