天天看点

[Git] autocrlf

在windows下面装git,autocrlf的值默认是true,表示clone下来的代码行尾自动转换为CRLF,也就是windows默认的行尾模式

可以通过下面配置,使clone不变,commit时把所有CRLF变为LF

git config --global core.autocrlf input 
           

这么做,在windows/linux/mac上就都一致了

但是行尾以LF结束,用记事本打开文件,不太友好,可以用notepad++打开文件