Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to view GitHub Contributors Graph for branches other than master?

Tags:

github

graph

At https://github.com/yourusername/yourreponame/graphs you can find some nice graphs showing commits over time. However the information is only for the master branch.

How do I see the same information for a branch other than master, or see a graphs taking account commits across all branches?

If this is not possible, how can I at least see how many line of code have been committed under a particular branch via the GitHub web GUI?

Is any of this possible?

like image 204
Marc M. Avatar asked Feb 20 '13 04:02

Marc M.


People also ask

Does GitHub only show contributions on master?

Github only counts contributions made to the default branch(which is usually master) but not those to any other branch. You can change your default branch from master to develop(from setting of that repository), if you work on it more often and wish to see contribution made to develop to appear as contributions.

Why does GitHub not show my contributions?

Your local Git commit email isn't connected to your account Commits must be made with an email address that is connected to your account on GitHub.com, or the GitHub-provided noreply email address provided to you in your email settings, in order to appear on your contributions graph.

How are GitHub contributions counted?

Whenever you commit to a project's default branch or the gh-pages branch, open an issue, or propose a Pull Request, we'll count that as a contribution. Repositories are sorted by your recent impact. A commit today is worth more than a commit last week.


2 Answers

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.
like image 146
Mikael Avatar answered Nov 07 '22 22:11

Mikael


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 :(

like image 34
Tanky Woo Avatar answered Nov 07 '22 21:11

Tanky Woo