210
votes

In GitHub, is there a way to see all recent commits on all branches. It would be best in reverse chronological order.

Maybe I'm snoopy, but I'd like to be able to see what my developers have been up to recently, at least in terms of commits to the repository on github. So far the closest I've seen is the network graph, which is certainly very useful.

7
I've found that SourceTree shows me what I want in an understandable way.Theodore Norvell
@TanyaGupta I think that only shows commits on one branch at a time.Theodore Norvell
correct. Since it was not a complete answer I posted it as a comment in case it is helpful for others like it was for me.Tanya Gupta
Not snoopy at all IMHO. looking at commits is sometime essential to understand changes, or blame.JHBonarius

7 Answers

236
votes

As of today 2020-09-16, and speaking as someone who unfortunately has to use GitHub for a project, when I always use lovely GitLab, I finally found it.

Click "Code" (left-most tab) on the main page for the repository. Under those 4 buttons ("master", "Go to file", "Add file", "Code") there is a blue rectangle. At the right end of that is a clock icon and a number. If the viewport of your browser is wide enough it even includes (hurrah) the word "commits". This is a link. Click and ENJOY!!!

NB the URL for this page is like this: https://github.com/myProfile/myRepo/commits/master

Example screenshot

197
votes

This is an old feature of GitHub but not really that intuitive.

Using the GitHub website:

  1. Click a project
  2. Click the 'Insights' tab (moved inside the Meatballs menu)
  3. Click 'Network'
  4. Click on the 'node/circle' for each commit to go to that commit.

Diagram below. enter image description here Diagram showing all commits in a GitHub project

Additionally, you can drag to the left to see all commits throughout time for all forks and branches.

24
votes

I guess there is no any button which shows you a complete list of commits. If you want to list all commits in a repo, you could browse the following URL:

https://github.com/username/repository/commits

You can view the list of commits by adding the word commits (in plural) at the end of repo URL .

Optionally, you could add some query string to narrow the results in the list. For example:

https://github.com/username/repository/commits?author=johndoe

Update

Thanks to @lii I update this post:

If you want to view all commits in a branch, browse the following URL:

https://github.com/username/repository/commits/branch-name

And you could narrow the list of commits by browsing the following URL:

https://github.com/username/repository/commits/branch-name?author=johndoe
11
votes

This is the easiest way I found

enter image description here

10
votes

The user interface in GitHub does not currently support a way to see your commits in a branch from the code tab. However, I observed that when I select a branch from the branch selector dropdown, I see the following URL:

// This shows me all commits from all users in the branch called "2.2-stable"
https://github.com/jquery/jquery/commits/2.2-stable

If I click on a username in the list of commits, I observe the following URL:

//This shows me the list of commits from the user "mgol" in the master branch (default branch)
https://github.com/jquery/jquery/commits?author=mgol

So, I thought to myself, why not try to add the query string ?author=mgol to the URL that showed commits on a specific branch:

Solution:

// Show me the list of commits from the user "mgol" on the branch called "2.2-stable"
https://github.com/jquery/jquery/commits/2.2-stable?author=mgol

Again, the user interface has no button that lets you see this view (to the best of my knowledge) but you can manipulate the query string to filter only what you want to see.

4
votes

Look here: Github API: Retrieve all commits for all branches for a repo this is the only options. On website you can see only branch specific commits - you need to manually switch between them. Bitbucket allows to see all commits on all branches.

0
votes

The way I have my repos setup, each developer has a user.git account. I recommend doing the following:

git fetch --all

This fetch updates all the local copies of remote branches but doesn't create new local branches of these tracking remote branches. If you have local branches of all your developer's branches, you will want to run:

git pull --all

So what you need to do is git fetch --all and then git pull --all. I hope this helps.

Lastly, you can also do git remote update which is the same as git fetch --all