【问题标题】:Is "Merged in" a commit message created by bitbucket, or git?“合并”是由 bitbucket 还是 git 创建的提交消息?
【发布时间】:2015-08-23 16:08:33
【问题描述】:

样式指南“如何编写 Git 提交消息”部分 5. Use the imperative mood in the subject line 指出 git 本身使用命令式:

命令式听起来有点粗鲁;这就是我们不经常使用它的原因。但它非常适合 git commit 主题行。原因之一是 git 本身在代表您创建提交时使用命令式。

例如,使用 git merge 时创建的默认消息为:

Merge branch 'myfeature'

当使用 git revert 时:

Revert "Add the thing with the stuff"

This reverts commit cc87791524aedd593cff5a74532befe7ab69ce9d.

或者当 单击 GitHub 拉取请求上的“合并”按钮:

Merge pull request #123 from someuser/somebranch

但是,在 bitbucket 上的 git 存储库上,我遇到了指示性情绪:

在 feature/123 中合并(拉取请求 #1234)

这是由 bitbucket 而不是 git 创建的消息吗?

【问题讨论】:

  • 你能直接从 Git 中提供一些文档,说明在提交中使用了命令式情绪吗?我可以说Merge branch 'myfeature' 实际上是Merge of branch 'myfeature' 的缩写。
  • @TimBiegeleisen:来自 Git 自己的 SubmittingPatches 文档:github.com/git/git/blob/…
  • git 本身没有拉取请求的概念,因此管理拉取请求的任何东西都是唯一可能的罪魁祸首。
  • 对BitBucket的JIRA提出了建议:jira.atlassian.com/browse/BSERV-8427
  • 为了记录,这是 Ric 在 Bitbucket Cloud bugtracker 上的票:bitbucket.org/site/master/issues/12472 如果你也对“合并”感到恼火,那就去投票吧:)

标签: git bitbucket commit-message


【解决方案1】:

从我团队的分支来看,当有人合并自己的 PR 时,你会看到

"合并 bitbucket.org 的分支 'branchName'...".

当有人合并别人的 PR 时,你会看到

“合并到 teamName/repositoryName/branchName”

【讨论】:

    猜你喜欢
    • 2016-10-10
    • 2013-01-01
    • 2014-06-01
    • 2020-09-05
    • 2021-05-01
    • 2011-04-18
    • 2012-12-15
    • 2013-05-08
    • 1970-01-01
    相关资源
    最近更新 更多