提交只是没有显示在 GitHub 图形上?

Commits simply not showing on GitHub graphic?

因此,自从我开始从事这个新项目后,我的提交就不再显示在 GitHub 图形上,对我来说没有绿色瓷砖。我在一个个人项目上工作,我能够在图形上看到我的提交,但是当涉及到另一个项目时,没有任何反应。

我已经阅读了文档但一无所获,我的工作朋友没有遇到与存储库相同的问题,所以我不知道还有什么可能。我什至从我的机器上删除了项目并再次克隆,仍然没有任何变化。

是的,我可以通过 git log 查看我的提交,它们都在那里。

您提到您的提交是在默认分支以外的其他分支上。来自 GitHub's documentation:

Commits

Commits will appear on your contributions graph if they meet all of the following conditions:

  • The email address used for the commits is associated with your GitHub account.
  • The commits were made in a standalone repository, not a fork.
  • The commits were made:
    • In the repository's default branch
    • In the gh-pages branch (for repositories with project sites)

For more information on project sites, see "About GitHub Pages."

In addition, at least one of the following must be true:

  • You are a collaborator on the repository or are a member of the organization that owns the repository.
  • You have forked the repository.
  • You have opened a pull request or issue in the repository.
  • You have starred the repository.

因此,只有来自默认分支或 gh-pages 分支的提交才会出现在图表中。如果您在不同的分支上工作,然后合并到默认分支,那么您合并的所有提交也将在贡献图上可见。