如何查看除 master 以外的分支的 GitHub 贡献者图表?

https://github.com/yourusername/yourreponame/graphs你可以找到一些很好的图表显示提交随着时间的推移。但是,这些信息仅供主分支使用。

如何查看除 master 以外的其他分支的相同信息,或查看考虑所有分支提交的图表?

如果这是不可能的,那么我怎样才能至少看到通过 GitHub web GUI 在特定分支下提交了多少行代码呢?

这一切都有可能吗?

34976 次浏览

From what I can see, those graphs are for master only: I only committed on the branch gitlist recently, and my commit activity only shows those for master.

Unless you rebase your branch on top of a new repo you would create specifically for that kind of inspection, said branch activity won't be visible until it is merged back in master.

I just stumble on this as well. You can actually see the graphs for other branches than the Master branch.

  • On Github in your repo - choose settings.
  • In settings - change your default branch to whatever branch you would like to see the graphs for.

The help of Github: Viewing contributions :

Whenever you commit to a project's default branch (or the gh-pages branch), open an issue, or propose a Pull Request, we count that as a contribution.

So:

  • default branch
  • gh-pages branch
  • open an issue
  • pull request

only these will be counted.

As @Mikael 's answer, you can change the default branch in repo's settings.

Another help of Github: Which contributions are counted?

For commit:

Your commit contributions are only counted when they are created on or merged into the default branch or gh-pages branch of a non-fork repository.


I also want github to count all the commits, not specified branch :(