原因:
不同操作系统下处理行尾结束符的方法是不同的,
windows下是CRLF(句尾使用回车和换行),unix下是LF(只换行),mac下是CR(只回车)
把编辑器中Git中Warn if CRLF line separators are about to be committed
取消勾选,就可以提交了;
方法2:GIt在安装的时候,Configuring the line ending conversions选第三个
Checkout as-is,commit as-is
Git命令行面板里面,输入git config –global core.autocrlf false