木心

毕竟几人真得鹿,不知终日梦为鱼

导航

git windows下换行符问题

不同操系统下的换行符
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

 

posted on 2019-07-29 17:16  wenbin_ouyang  阅读(1428)  评论(0编辑  收藏  举报