Git配置格式(一键LF)

发布时间 2023-11-23 14:03:20作者: 胡姐姐

1、如果项目本身是LF格式的,拉下来就变成了CRLF格式的,可以使用以下命令。

git config --global core.autocrlf false

2、其他命令

// 提交时转换为LF,检出时转换为CRLF
git config --global core.autocrlf true  
 
// 提交时转换为LF,检出时不转换
git config --global core.autocrlf input  
 
// 提交检出均不转换
git config --global core.autocrlf false

Alt text