不同操系統下的換行符
CR回車 LF換行 Windows/Dos CRLF \r\n Linux/Unix LF \n MacOS CR \r
1、執行git config --get core.autocrlf
https://blog.csdn.net/twilightdream/article/details/52020461
https://www.cnblogs.com/warking/p/5718648.html
1) 對已使用Windows換行符的文件,可以使用Sublime Text打開,
View->Line Endings,選Unix,保存
2)AutoCRLF
#提交時轉換為LF,檢出時轉換為CRLF git config --global core.autocrlf true #提交時轉換為LF,檢出時不轉換 git config --global core.autocrlf input #提交檢出均不轉換 git config --global core.autocrlf false
2、https://www.cnblogs.com/fangshenghui/p/5693610.html
解決方案:windows下面換行使用Unix風格。
git config --get core.autocrlf ===》 false