| true | 检出转 CRLF、提交转 LF(常见于 Windows) |
|---|---|
| input | 提交转 LF、检出不转(macOS/Linux) |
| 查看现状 | git ls-files --eol | head |
常用示例
常用示例
git config --global core.autocrlf true
git config --global core.autocrlf input
git ls-files --eol | head规则随仓库走(.gitattributes)比每个人各配 autocrlf 更可靠,评审差异也更干净。