【发布时间】:2015-02-14 01:32:44
【问题描述】:
我正在尝试做一些非常简单的事情:查看具有 CRLF 结尾(并且没有 .gitattributes)文件的 repo,并以本机 (LF) 行结尾结尾。我什至不想再承诺。
我读过 Github's suggestion 和 Tim Clem's article,但它们似乎主要针对 Windows 开发人员。
我试过这个:
$ git config --global core.autocrlf=input
$ git clone https://github.com/DennisSchiefer/Project-OSRM-Web.git
但是没有 - 我关心的文件 OSRM.Config.js 仍然有 CRLF 结尾。
尝试core.autocrlf=true 没有帮助。
即使添加和提交 .gitattributes 文件(然后是 git rm --cached -r . && git reset --hard)也无济于事。
我找不到任何组合实际上会在此文件上留下 LF 行结尾。
【问题讨论】:
标签: linux git line-endings git-config