Git core.autocrlf 行尾默认设置 [英] Git core.autocrlf line ending default setting

查看:23
本文介绍了Git core.autocrlf 行尾默认设置的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如果用户不更改此设置,我正在尝试找出 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 行尾默认设置的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆