You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

Git配置项branch.<name>.fetch是否曾真实存在?

branch.<name>.fetch 是否真实存在于Git配置中?

在git-fetch的首个示例里提到了配置项branch.<name>.fetch,示例内容如下:

更新远程跟踪分支:

$ git fetch origin

上述命令会将远程refs/heads/命名空间下的所有分支复制到本地refs/remotes/origin/命名空间,除非使用branch..fetch选项指定非默认的refspec。

但在git-config文档中,找不到任何关于branch.<name>.fetch的说明。

通过在git-config文档中检索所有以branch.开头或以.fetch结尾的配置项后可以确认:branch.<name>.fetch从未作为真实的Git配置项存在过,它明显是remote.<name>.fetch的笔误。

注:该提及branch.<name>.fetch的示例是在2009年的commit d504f69中添加的。


内容的提问来源于stack exchange,提问作者muzimuzhi Z

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.08.06 04:16:09