问题描述
如果用户不更改此设置,我将尝试找出Git中core.autocrlf
的默认值.
I'm trying to figure out what is the default value for core.autocrlf
in Git if the user doesn't change this setting.
我已经查看了文档,但是找不到此信息.能给我指出正确的方向吗?
I've looked in the docs but can't find this info. Can you please point me in the right direction?
具体来说,在重新安装Git时,从Windows系统提交回购协议时,Git会自动将Windows行尾转换为Unix吗?
Specifically, on a fresh Git install, would Git automatically convert Windows line endings to Unix when committing to a repo from a Windows system?
谢谢!
推荐答案
检查 git源代码默认将core.autocrlf设置为false. (并且自此属性在 2007年2月13日上的最初介绍以来,从静态值转换为常量.)
Checking the git source code, core.autocrlf is set to false by default. (And has been since the property's original introduction on Feb 13, 2007, though it has since been converted from a static value to a constant.)
Windows安装程序确实要求您为此属性选择一个值,该值是在git系统配置中显式设置的.
The Windows installer does require you to pick a value for this property which is explicitly set in the git system config.
这篇关于Git core.autocrlf行结束默认设置的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!