git 换行符LF与CRLF转换问题

1.Git设置

git config --global core.autocrlf false
git config --global core.safecrlf true
含义:
AutoCRLF
#提交时转换为LF,检出时转换为CRLF
git config --global core.autocrlf true

#提交时转换为LF,检出时不转换
git config --global core.autocrlf input

#提交检出均不转换
git config --global core.autocrlf false
SafeCRLF
#拒绝提交包含混合换行符的文件
git config --global core.safecrlf true

#允许提交包含混合换行符的文件
git config --global core.safecrlf false

#提交包含混合换行符的文件时给出警告
git config --global core.safecrlf warn

原文地址:https://www.cnblogs.com/phpzhou/p/9945123.html