gpt4 book ai didi

git - merge 来自同一用户的提交在 GitHub 上出现两次

转载 作者:太空狗 更新时间:2023-10-29 13:42:22 26 4
gpt4 key购买 nike

注意到我的名字在我的存储库中出现了两次,在 GitHub 更新中,您会看到我的 GitHub 个人资料,并且只有我在正在编辑自述文件的网站上提交。在另一个名字(仍然是我的名字)上,您可以从计算机上看到我的 git 更新。

我怎么能 merge 这两个,因为它们都是我的。这是一个示例。到目前为止,我的代码贡献在贡献页面上是看不到的。链接在这里,我怎样才能解决这个问题。

enter image description here

最佳答案

这些提交未链接到您的 GitHub 用户。

来自官方 GitHub help article :

If your commits are not linked to any user, we will display the grey Octocat logo beside them.

To check the email address used for those commits and connect commits to your account, take the following steps:

  1. Navigate to the commit by clicking the commit message link.
  2. To read a message about why the commit is not linked, hover over the blue to the right of the username:

enter image description here

Unrecognized author (with email address): If you see this message with an email address, it means the address has not been added to your account settings. To link your commits, add the email address to your GitHub email settings.

Unrecognized author (no email address): If you see this message without an email address, it means you used a generic email address that can't be added to your email settings. You will need to set your commit email address in Git, then add the new address to your GitHub email settings to link your future commits. Old commits will not be linked.

Invalid email: This means the email address in your local Git configuration settings is either blank or not formatted as an email address. You will need to set your commit email address in Git, then add the new address to your GitHub email settings to link your future commits. Old commits will not be linked.

如果有评论,您可以尝试使用 git config --global user.email "your_email@gmail.com" 将您的提交与您的 GitHub 用户名相关联。 Git 和 GitHub 的电子邮件地址必须相同。另请注意,这仅适用于 future 提交。对于过去的提交,您可以根据需要重新提交:

git reset --soft HEAD
git config --global user.email "your_email@gmail.com"
git commit -c ORIG_HEAD

另外,请实际require your admins to approve Pull Requests ,(而不仅仅是建议公众不要在没有这样做的情况下推送到您的 master 分支)。让 Pull Requests 开放以供公众 merge ,您就是在向各种不当行为敞开大门。

关于git - merge 来自同一用户的提交在 GitHub 上出现两次,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/48939323/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com