Github 贡献图表不正确的日期

Github contribuition graph incorrect dates

我在我的 github 项目中几乎没有推送到 master 分支。我已经查过了,上面说它们是 10 月 6 日制作的。

有人知道为什么会这样吗?

第二个小问题:git config --global user.name - 设置这个,对 github 的贡献有什么影响吗?

谢谢!

我认为设置 user.name 对贡献没有任何影响。 Github 根据您的电子邮件 ID 将您的提交链接到您的个人资料。参考:https://help.github.com/articles/setting-your-username-in-git/

您是否有可能在某个时间点进行了 git rebase

Git commits have two dates attached to them, GIT_COMMITTER_DATE and GIT_AUTHOR_DATE。它们通常具有相同的值。但是像 git rebase 这样的一些命令可以改变提交日期。

要查看这两个日期,您可以 运行 git log --pretty=fuller.

在GitHub的网络中使用GIT_COMMITTER_DATE在时间轴中显示项目的网络。

如果您想将提交日期恢复为作者日期,您可以尝试使用另一个 SO 答案中描述的 these approaches

I'd like to add another approach if you've already screwed up but don't want to iterate through the whole history: git rebase --committer-date-is-author-date <base_branch> This way, git will reset the commit date only for the commits applied upon (which is probably the same branch name you used when you screwed up). - speakman