273

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.

Theodore Norvell
  • 13,793
  • 6
  • 30
  • 42

8 Answers8

303

Please note: this is not the right answer, although I hope it continues to be useful. NB it has been made a "Community" answer so I don't receive any points from upvotes

To see all commits for a specific branch (so this does NOT actually answer the original question, which is to see commits across all branches):

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

mike rodent
  • 12,285
  • 11
  • 88
  • 123
  • 38
    Thanks for finding this! This is definitely the right answer. The Commits link feels so hidden in plain sight and really should be up with the other primary buttons (master, Go to File, etc). If you're having trouble finding it, ctrl+f for "commits" on the "Code" tab. – Mykaelos Sep 30 '20 at 13:56
  • 21
    I don't think this shows all commits. I think it shows only commits that are ancestors of the commit on the master branch. – Theodore Norvell Oct 28 '20 at 01:49
  • 1
    @TheodoreNorvell just to test this I created a new branch ... on the page showing the commits (initially of master) there is a little rectangle/drop-down selection box at the top left: you simply have to choose the branch of interest and it displays the DAG according to the perspective from that branch... that's my experience anyway. The URL is then https://github.com/myProfile/myRepo/commits/my_other_branch – mike rodent Nov 03 '20 at 16:13
  • Thanks. That's very useful. It's still one view that shown all recent commits regardless of branch. – Theodore Norvell Nov 16 '20 at 20:10
  • "... still missing one..."? True, my bad: I didn't read carefully your specific question. Asking quite a lot from GitHub perhaps - I think you'd have to do that (after cloning etc.) from the CLI: https://stackoverflow.com/q/10349302/595305 (and omit the `--author` switch) – mike rodent Nov 16 '20 at 21:37
  • 10
    This is not the correct answer. This only shows commits in the selected branch, which can only be one. – xissburg Feb 03 '21 at 23:15
  • @xissburg. I agree. The Network Graph is the best answer to the question. Clearly though a lot of baffled people searching for "see commits at Github" end up here. Incidentally the asker, Theodore Norvell, clearly wasn't totally satisfied with the NG as he mentions it in the question. It's not clear why not. Maybe he wanted more specific or structured information than you get with the NG. See my comment above here of 2020-11-16: I'm pretty sure this is not possible without cloning/pulling which (it should be pointed out!) isn't difficult to do. – mike rodent Feb 05 '21 at 14:13
  • I just want to see activity on a project, if it is alive, without cloning it. I could not see this link. Intuitive UX. :) Bitbucket places this link better. – frmbelz Mar 09 '21 at 22:04
  • @Mykaelos would you mind removing your comment that has 32 hits, it is completely wrong. The OP is clear they want to see commits across *all* branches, whereas this answer is for one branch only. So it is definitely the *wrong* answer. – Oliver Nov 30 '21 at 17:32
  • The Arnout Devos answer to the question is useful in conjunction with this answer. – Theodore Norvell Feb 13 '22 at 17:07
230

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.

Smart Manoj
  • 4,375
  • 4
  • 27
  • 51
John Deverall
  • 5,334
  • 2
  • 26
  • 35
  • 1
    Thanks. I did mention the network graph in my OP. Nevertheless, this seems to be the correct answer, As I commented elsewhere, I generally use sourcetree's network visualization to get an overview of activity. – Theodore Norvell Apr 05 '17 at 11:39
  • @JohnDeverall, why do you say it's not that intuitive and why there isn't an obvious link for recent commits for a branch? I'm just moving from svn to git so I'm unaware of git world. – Sachin Verma Aug 23 '17 at 11:47
  • @sachinverma there's just a few clicks to get there that's all. The new bitbucket interface is easier to use IMHO – John Deverall Aug 23 '17 at 21:08
  • 22
    They *really* need to add viewing all branches commits as an option to the commit list page. 1 pixel hunting on that graph is an awful way to get a view of what's going on in the git repo. It's not really a solution. – Scott Mar 26 '18 at 15:30
  • @JohnDeverall Is there any way to check all the commits if they are still on my local system and not pushed them? – punitcse Apr 11 '19 at 10:17
  • @punitcse type 'git log' at the console - but you can't do it through the github interface until you've pushed your commits. – John Deverall Apr 11 '19 at 10:44
  • @JohnDeverall but that will give me only the commits on that particular branch. But I wanted to see my commits on all branches. – punitcse Apr 11 '19 at 10:48
  • 1
    @punitcse. Not sure - try https://stackoverflow.com/questions/2016901/viewing-unpushed-git-commits ? – John Deverall Apr 11 '19 at 10:54
  • 6
    N.B. As of early 2019, the Network option, as well as most other Insights options, are not available for private repos of free accounts. You either have to make the repo public, or upgrade to GitHub Pro – DiegoDD May 24 '19 at 20:06
  • @DiegoDD the Netwrok option is not available, but you still able to see the commits for private repos, using direct path like https://github.com///commits – Lidia Jul 08 '20 at 11:00
  • @ThedoreNorvell ... you're right, this is the best answer to your question and it would be wrong to accept mine. But since you mentioned that you knew of the NG, can I ask what you don't like about it? If you want structured info I pretty firmly believe you have to clone/pull and run something like the CLI command I suggest in my comment to my question of 2020-11-16. So, another question: what's the issue with doing that? Wouldn't that make your life easier, which is usually a good thing? – mike rodent Feb 05 '21 at 14:18
  • Pity, that this graph is not scrollable vertically, so if you have longer branch names, you can't see them... – Filip Stachowiak Apr 29 '21 at 12:21
  • @mikerodent This was a long time ago and I no longer recall why I didn't like the network graph. It might have been that you can only see one commit at a time. Anyway, after asking the question, I started using SourceTree, which has a really nice graph that includes one line of information about each commit, including those only in tracking branches. – Theodore Norvell Jun 03 '21 at 17:13
35

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
John Cardozo
  • 495
  • 6
  • 10
  • 6
    this will only give you commits on master branch, not all commits – dWitty Nov 16 '20 at 10:20
  • @dWitty: You can get commits on the other branches by adding `/` to the end of the URL. I guess you only can see one branch at the time, though. – Lii Nov 17 '20 at 07:22
  • 2
    Why're these links hidden now!? – j4hangir Jan 09 '21 at 16:37
  • Is there really no button that links to this URL? Do I really have to manually enter it? – Niko O Jul 19 '21 at 18:39
  • @NikoO I just checked the GitHub website and I still don't see any button or link to view commits page. – John Cardozo Jul 26 '21 at 19:34
  • @JohnCardozo A friend pointed it out to me recently: There's a blue-ish banner kinda at the top of the page. At the very right of that there's a kind of clock-like symbol with e.g. " 6,634 commits" to the right. You can click that and it links to the page we are talking about. It seems obvious when you know it, but if you don't it's really not. – Niko O Jul 26 '21 at 20:52
10

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.

jmort253
  • 33,123
  • 11
  • 95
  • 117
6

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.

Community
  • 1
  • 1
m.aibin
  • 3,368
  • 4
  • 28
  • 45
  • 1
    Thanks. I was hoping for a nonAPI approach. https://api.github.com/repos/UNAME/PROJECT/commits seems to return the information I'm looking for in JSON. I guess I can turn it into HTML myself. – Theodore Norvell Nov 26 '15 at 02:04
  • 4
    Kinda lame it's not in GitHub by default. – ptkato Oct 30 '16 at 03:03
5

Since the 'Insights'/'Network' solution is only available for public/GitHub Team repositories, I found a method that works for both private and public repositories.

github.com/username/reponame/branches

Next to the currently selected branch dropdown, there is a link to github.com/username/reponame/branches

branches

This gives you a (clickable) list of all branches with their most recent commits, in chronological order, as asked in the question:

branches with their most recent commit


Although this method does not show all commits (only the most recent one) across all branches, this does allow you to check which of the (new) branches has been updated most recently, and further your investigation. I use this all the time.

Community
  • 1
  • 1
Arnout Devos
  • 51
  • 1
  • 5
0

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

0

This seems to have been updated, now you can just look at them by clicking commits ni your repo! example img

8koi
  • 11
  • 2
  • 2
    Isn't it exactly what this [2020 answer](https://stackoverflow.com/a/63925422/6309) illustrates? – VonC Mar 16 '22 at 21:18