git - 我如何让 github 将 PR 与特定的电子邮件/用户信息 merge ?

标签 git github

我有以下情况。在 github 我有两个电子邮件地址:stefano@home 和 stefano@work。我的 github 帐户配置为 stefano@home 作为主要地址。在工作中,我正确地设置了我的 git checkouts 以使用 stefano@work 创建提交。但是,当我转到 github 并将 PR merge 到工作的 repos 时,我的 merge 提交显示为 stefano@home 地址。

我怎么能说那个特定 repo 上的所有 PR merge 都必须有 stefano@work?

最佳答案

从 GitHub UI merge 总是使用您帐户上的主电子邮件地址,...
但是,自 2019 年 4 月 24 日(4 年后):

"Choose your merge commit email "

You can now choose the author email for commits created when merging pull requests via the web.
As a reminder, you can also choose the author email for web-based edits.

For more information, see merging a pull request.

enter image description here

2022:GUI 也是:

https://docs.github.com/assets/cb-14417/images/help/pull_requests/merge_box/pullrequest-commitmessage.png

温馨提示:

If you have more than one email address associated with your account on GitHub.com, click the email address drop-down menu and select the email address to use as the Git author email address.

Only verified email addresses appear in this drop-down menu.
If you enabled email address privacy, then <username>@users.noreply.github.com is the default commit author email address.

For more information, see "Setting your commit email address".

关于git - 我如何让 github 将 PR 与特定的电子邮件/用户信息 merge ?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/32783888/

相关文章:

git - 如何从短哈希中获取完整的 git 提交哈希?

如果你有 fork ,GitHub 不允许 fork fork ?

ruby-on-rails - 忽略git中的本地配置文件

c# - 如何在github仓库中找到文件路径?

Git - 保留由特定作者完成的提交

Github 贡献日历日开始时间

Git:从另一个分支获取更改

Git 推送卡在 99%

Git rebase 和 Vim 编辑器

java - Git rebase 回到功能开始