349

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
  • 15,366
  • 6
  • 31
  • 45

14 Answers14

379

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
  • 14,126
  • 11
  • 103
  • 157
  • 51
    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
  • 25
    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
  • 13
    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. – Vladislav Povorozniuc 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
  • this was the right answer for what I was looking for, but it wasn't clear for me. @NikoO said it clearly: "There's a gray-ish banner towards the top of the page. At the right of that there's a clock-like symbol with e.g. " 6,634 commits". You can click that to see the commits for the branch. It seems obvious when you know it, but if you don't it's really not." – Kai Carver Jun 16 '22 at 08:39
  • Hidden in plain sight is truly the right description for this link! – HelloGoodbye Aug 18 '22 at 11:43
  • It's not a blue rectangle, it's just a clock icon in white (at least in dark mode) with a commit count and the word "commits". It turns blue on hover; but it *is* *underneath* the blue "Code" rectangle used for copying the repo path. – NeilG Mar 29 '23 at 04:46
270

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
  • 5,230
  • 4
  • 34
  • 59
John Deverall
  • 5,954
  • 3
  • 27
  • 37
  • 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
  • 32
    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
  • 7
    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
  • Yeah it's an annoyingly old feature - they should get a grad to jazz up the UI imo – Gus Bus Nov 23 '22 at 13:33
  • Seems nonsense to me. Both the interface, which is not intuitive at all, and the location they put it. It should be one of the most visible section IMO, after Code, Issues and Pull Requests. It's quite difficult to find it in Insights -> Network (why network by the way?). Nevertherless, thank you for pointing it out! – A. Wolf Nov 27 '22 at 15:01
46

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
  • 743
  • 7
  • 10
  • 9
    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
  • 1
    @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
  • @NikoO's answer should be the first answer for this question. And Niko O should get the Nobel Prize in Computing for giving this obvious-but-not answer – Kai Carver Jun 16 '22 at 08:34
11

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.

jamesmortensen
  • 33,636
  • 11
  • 99
  • 120
10

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
  • 101
  • 1
  • 6
7

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,528
  • 4
  • 28
  • 47
  • 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

There is no way to attain that within the original GitHub. But there is a work around.

You could use Le Git Graph (read as legit graph), a browser extension that does exactly this.

Le git graph demo

Install the extension from here : https://chrome.google.com/webstore/detail/le-git-graph-commits-grap/joggkdfebigddmaagckekihhfncdobff

It will add a new "commits" section to every GitHub repo you open. Open the commits graph and there, all commits across branches will be listed along with the git graph.

Le git graph demo 2

Hope it helps! An upvote would be highly appreciated!

Nirmal Scaria
  • 318
  • 3
  • 6
2

If viewing this from github.com is not a hard requirement, you can use git:

Clone the project locally, then run the following to show the list of all commits from all branches, sorted by date in descending order:

git log --oneline --all --since="Jan 20 2022"

where --since (and --until) allows you to specify a time range and --all displays commits from every branch including remotes. Alternatively you can replace --all with --branches=*.

You can also display the date and authors with something like this:

git log --oneline --pretty="%C(yellow)%h %C(cyan)%cd %C(magenta)%aN%C(auto)%d %Creset%s" --date-order --date=format:"%y%m%d-%H%M" --all --since="Jan 20 2022"

You can also add --graph switch to get a more structured view instead of a plain list.

Please note: dates may not be reliable to track work: some operations will modify history, e.g. a rebase may update the date of old commits to the date of the rebase, squash may keep the oldest date only, a commit date may be modified arbitrarily, etc.

Yook
  • 31
  • 2
1

enter image description here

The actions tab has all recent activities done on a repo for all branches.

joseluke
  • 65
  • 1
  • 12
1

The new (May-June 2023) Activity view won't display all commits, but all the "important" one on all branches.

https://docs.github.com/assets/cb-171448/mw-1440/images/help/graphs/activity-view-compare-changes.webp

View repository pushes on the new activity view (May. 2023)

We've now made it easier to understand changes to your repositories with the new activity view.
Historically viewing pushes to a repository required contacting GitHub support.
This new activity view gives users with read access the ability to self-serve insights to a repository and all of its changes.

You can access the Activity view from the main page of a repository by clicking "Activity" to the right of the list of files.

https://github.blog/wp-content/uploads/2023/05/241323374-c109aebf-0f27-4770-bcf7-f51b5431990b.png?w=1775  -- Location of activity view link on repo homepage

You can also access the activity view from the Branches page of any repository by clicking on the activity icon.

https://i0.wp.com/user-images.githubusercontent.com/90000203/211119946-d266144e-89c8-483e-bd23-b041c2fdac92.png?w=184&ssl=1 -- Branch activity icon

https://i0.wp.com/github-production-user-asset-6210df.s3.amazonaws.com/90000203/240979106-aad0b0ac-48d5-4cc8-9bd3-06720fcc554a.png?w=1356&ssl=1 -- Activity view

From the activity view you can sort and filter to find exactly what you are looking for.

https://i0.wp.com/user-images.githubusercontent.com/90000203/211120261-1b513637-38c3-4ba0-8983-8abddca6b187.png?w=328&ssl=1 -- Filter activity type

Here is an example of how you could use the activity view to find a force push on a particular branch, and then compare the changes to the repository before and after the push:

https://i0.wp.com/user-images.githubusercontent.com/90000203/213346826-f97017bf-6c3b-4610-b319-1cf48804e911.gif?w=800&ssl=1 -- Screen recording of the activity view

Learn more about the Activity view.

Already using the activity view? We'd love to hear your feedback.

VonC
  • 1,262,500
  • 529
  • 4,410
  • 5,250
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

I needed to find one specific commit I wrote (regardless of a specific repository, etc.)
and could only remember one word of the corresponding commit message.

Since I couldn't really find a solution that satisfied me, either here or in answers to similar questions
(also, a lot of time has passed since the initial question was posted here by the author and GitHub might have gotten some updates since then).
So I did a bit of research on the GitHub website myself and (with one specific information on the GitHub Docs) found the perfect solution for my case.


TL;DR:

Template URL to list all commits of a specific committer on GitHub

https://github.com/search?q=committer-name:NAME&type=commits
→ Simply replace NAME with the specific committer name you are looking for.


So, if anyone else might stumble across the same situation as I did, hopefully this input of mine might help you in the future.

Menersar
  • 1
  • 2
-1

best way to access all commit of a repository is

  1. install app of the GitHub on your PCs
  2. clone repo with that
  3. on the history tab you can find all commit

but you need patient and scroll down on this tab ;) have a good time

alikz
  • 1
  • 2
-3

Simply run the following command and keep on pressing enter as you see the details of each commit step by step

git log
Adriaan
  • 17,741
  • 7
  • 42
  • 75
MUHINDO
  • 788
  • 6
  • 10