GitHub 用户名更改(使用 noreply 作为提交的电子邮件)

GitHub username change (with noreply as email for commits)

我看到 GitHub 有改名功能,丢失对我来说似乎不是什么大问题。然而,我意识到我一直在使用我的旧名字 @users.noreply.github.com 来提交和一切。因此,那封旧电子邮件将我之前的所有提交 link 整合在一起。有什么办法可以解决这个问题吗?

我一直在想,也许我可以用我以前的名字创建一个帐户,让感兴趣的人通过它 link?在这种情况下,重新设置 repo 或类似的东西不太适用,因为我已经向其他存储库贡献了代码,所以我的旧提交仍然在那里没有名字或电子邮件到 link 帐户。

我一直在想的另一种方法是把我的名字改回来,但我想这是最后的办法了。这有点不幸,但我想由于 Git 的工作方式,它只能像这样。 (我现在已经切换到我的 gmail 电子邮件,以防将来发生这种情况)

如何解决它取决于您的理念。也就是答案自以为是,所以我提出自己的看法:rewriting history is lying:

The primary output of development work should be source code. Is a well-maintained history really such an important by-product? Most of the arguments for rebase, in particular, rely on aesthetic judgments about “messy merges” in the history, or “unreadable logs”. So rebase encourages you to lie in order to provide other developers with a “clean”, “uncluttered” history.

(Source,强调我的。)

所有这些旧提交都是在您的原始品牌下进行的。无论出于何种原因,您已决定 重新打造 自己的品牌。也许是微不足道的,或者也许是出于某些根本原因。不管怎样,从互联网的角度来看,你是不同的。不要去重写历史来追踪你的旧自我直到你的新自我。让这些提交保持原样。

相反,请考虑添加 another email 或在您的项目 README 上张贴通知。