【问题标题】:Git config branch rebase true by pattern instead of nameGit config branch rebase true by pattern 而不是 name
【发布时间】:2013-09-05 02:30:18
【问题描述】:

Git 文档有以下内容:

branch.<name>.rebase
When true, rebase the branch <name> on top of the fetched branch, instead of merging the default branch from the default remote when "git pull" is run. See "pull.rebase" for doing this in a non branch-specific manner.

如果我使用该分支的名称,一切都是完美的,但我想将此选项应用于具有通用模式的分支集,例如“feature-branch-*”,这些分支将是短暂的而且我不想在 git config 中单独管理它的配置。

有没有人知道如何做到这一点,或者这是不可能的?

【问题讨论】:

  • 您是否尝试过使用虚拟仓库中的模式来查看会发生什么?
  • 我尝试使用配置为git config feature-branch-*.rebase true 的示例项目,但它不起作用

标签: git git-rebase git-pull git-config


【解决方案1】:

我尝试在 msysgit 版本 1.8.3 中使用 glob 模式 branch.prefix-*.rebase,但它不起作用,所以至少对于那个版本的 Git,你必须使用确切的名称。

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2018-10-18
    • 2017-12-05
    • 2015-11-14
    • 2021-05-09
    • 2018-08-31
    • 2015-06-22
    • 1970-01-01
    • 2023-04-03
    相关资源
    最近更新 更多