【问题标题】:Default Merge Commit message templates for all projects in group组中所有项目的默认合并提交消息模板
【发布时间】:2022-07-05 14:51:45
【问题描述】:

有没有办法在所有项目(包括组中新创建的项目)中创建默认合并提交消息,而不是在每个项目中手动更改?

我希望我的默认合并提交消息包含我之前的提交描述/正文。

Merge branch '%{source_branch}' into '%{target_branch}'

%{title} - %{description}

%{issues}

See merge request %{reference}

Gitlab Commit message template 这个链接只告诉我按项目来做。

【问题讨论】:

  • 您所说的模板是 GitLab 功能,而不是 Git 功能。 Git 确实有git commit -t 和commit.template,但细节不同。我还要补充一点,不鼓励为真正的合并做这种事情,但对于壁球“合并”不仅不气馁,还有git-fmt-merge-msg 为你做这件事!

标签: git git-commit


【解决方案1】:

GitLab 组可以有file templates 和Custom group-level project templates。

试试create a project from a built-in template,看看你能不能先定义它来包含你的commit.template。
但如果不是,这意味着这些文件模板不包含您需要的内容(提交或合并请求模板)。在这种情况下,需要逐个项目添加它们。

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2016-04-26
    • 2012-01-24
    • 2012-09-26
    • 1970-01-01
    • 2012-11-11
    • 2011-12-18
    • 2022-11-14
    • 1970-01-01
    相关资源
    最近更新 更多