【问题标题】:Why is Github Enterprise a committer of all merge commits?为什么 Github Enterprise 是所有合并提交的提交者?
【发布时间】:2020-02-27 09:22:31
【问题描述】:

当我在 GitHub 上合并 PR 时,合并提交的提交者始终是“GitHub Enterprise”。作者仍然指向我的帐户。

这是它在我的存储库中的样子

Commit 2:
  - the message is "Merge pull request #xx from branch" as it was created by PR
  - the author is me, but the committer is GitHub Enterprise

Commit 1:
  - this is the original commit from which I created a PR
  - both the author and committer are me

我找不到任何与更改提交者相关的设置。我也不认为有任何钩子可以覆盖提交者。

【问题讨论】:

    标签: github github-enterprise


    【解决方案1】:

    您在 GitHub UI 中进行了合并,并且是 GitHub 网站代表您进行了实际提交并将其存储。

    • 如果您进行了快进合并,则提交将由您创作并由您提交。
    • 如果您在 UI 中进行 squash 合并,服务器需要代表您创建一个新的 squashed 提交,因此提交者和作者将不一样。
    • 如果您在 UI 中执行合并提交 (--no-ff),则服务器需要代表您创建合并提交,因此提交者和作者不会相同。
    • 如果您在本地完成所有工作并直接推送到目标分支(可能被策略阻止),则 UI 无需代表您执行任何操作。
    • 如果您在本地完成所有工作并创建了一个快进合并就绪分支并通过拉取请求对其进行 ff-merged,则服务器也不需要代表您进行提交。

    【讨论】:

      猜你喜欢
      • 2020-10-17
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2010-12-13
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多