有没有一种方法可以在 .gitattributes
中强制执行 core.autocrlf=input
,以便将该策略传播给我的同事?
详细来说,我想在 add 时转换为 lf
,并在 checkout 时保持 asis
不变。
问题在于,在 .gitattributes
中,text
和 eol
都无法满足我的需求,因为 eol
有三个可接受的值:
lf
crlf
native
理想情况下,我希望我的 .gitattributes
文件看起来像这样:
* text eol=asis
* text=auto eol=lf
。 - Aaron Franke