注:如果您的提交链接到其他用户,这并不意味着该用户能够访问您的仓库。 只有您将用户作为协作者添加或将其添加到具有仓库访问权限的团队时,用户才能访问您拥有的仓库。
提交链接到其他用户
If your commits are linked to another user, that means the email address in your local Git configuration settings is connected to that user's account on GitHub Enterprise Server. In this case, you can change the email in your local Git configuration settings and add the new email address to your GitHub Enterprise Server account to link future commits to your account.
- To change the email address in your local Git configuration, follow the steps in "Setting your commit email address". 如果您在多台计算机上工作,则需要在每台计算机上更改此设置。
- Add the email address from step 2 to your account settings by following the steps in "Adding an email address to your GitHub account".
从这时开始,您提交的内容将链接到您的帐户。
提交没有链接到任何用户
如果您的提交没有链接到任何用户,则提交作者的名称不会显示为到用户配置文件的链接。
要检查用于这些提交的电子邮件地址并将提交连接到您的帐户,请执行以下步骤:
- 通过单击提交消息链接导航到提交。
- 要阅读有关提交未链接原因的消息,请将鼠标悬停在用户名右侧的蓝色 上。
- Unrecognized author (with email address) If you see this message with an email address, the address you used to author the commit is not connected to your account on GitHub Enterprise Server. To link your commits, add the email address to your GitHub email settings. If the email address has a Gravatar associated with it, the Gravatar will be displayed next to the commit, rather than the default gray Octocat.
- Unrecognized author (no email address) If you see this message without an email address, you used a generic email address that can't be connected to your account on GitHub Enterprise Server. 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 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 配置包含通用电子邮件地址或已附加到其他用户帐户的电子邮件地址,则您之前的提交将不会链接到您的帐户。 虽然 Git 允许您更改用于以前提交的电子邮件地址,但我们强烈反对这样做,尤其是在共享仓库中。
延伸阅读
- "搜索提交"