git 版本变成了git config --local
可用选项,我在哪里可以阅读更多相关信息?
我以为不提供--global
将自动假设它是本地配置变量。为什么需要这个新选项?
由于 git 源代码是在 git 中维护的,因此我们可以找到引入了--local
option:
commit 57210a678a8bedd222bf4478eeb0a664d9dd5369
Author: Sverre Rabbelier <[email protected] /cdn-cgi/l/email-protection>
Date: 2010-08-03 20:59:23 -0500
config: add --local option
This is a shorthand similar to --system but instead uses
the config file of the current repository.
此更改似乎首次出现在 2010 年底左右发布的 1.7.4 版本中。
据我所知,通过快速查看源代码(builtin/config.h
) 和手册页,默认为本地unless设置了某些环境变量,特别是$GIT_CONFIG
. The --local
选项显式覆盖任何环境变量设置。
See VonC的回答 https://stackoverflow.com/a/17290282/827263有关语义的更多信息--local
(在我最初发布此答案后,文档已更新)。
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)