【发布时间】:2017-07-28 19:46:27
【问题描述】:
有没有办法在.gitattributes 中强制执行core.autocrlf=input,以便在我的同事中传播该政策?
详细来说,我想要在 add 上转换为 lf 并在 checkout 上留下 as is。
问题是text 和eol 在.gitattributes 中都没有做我想做的事,因为eol 有3 个可接受的值:
lfcrlfnative
理想情况下,我希望我的 .gitattributes 文件看起来像这样:
* text eol=asis
【问题讨论】:
-
您希望存储库本身的行结尾是什么?如果?工作树中最初是什么?
-
你要找的设置是这样的:
* text=auto eol=lf
标签: git line-endings eol gitattributes core.autocrlf