387

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.

8

16 Answers 16

413

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

13
  • 56
    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
    Commented Sep 30, 2020 at 13:56
  • 26
    I don't think this shows all commits. I think it shows only commits that are ancestors of the commit on the master branch. Commented Oct 28, 2020 at 1: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 github.com/myProfile/myRepo/commits/my_other_branch Commented Nov 3, 2020 at 16:13
  • 15
    This is not the correct answer. This only shows commits in the selected branch, which can only be one.
    – xissburg
    Commented Feb 3, 2021 at 23:15
  • 1
    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
    Commented Mar 29, 2023 at 4:46
279
+200

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.

15
  • 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. Commented Apr 5, 2017 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. Commented Aug 23, 2017 at 11:47
  • 33
    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
    Commented Mar 26, 2018 at 15:30
  • 1
    @punitcse. Not sure - try stackoverflow.com/questions/2016901/… ? Commented Apr 11, 2019 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
    Commented May 24, 2019 at 20:06
49

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
7
  • 10
    this will only give you commits on master branch, not all commits
    – dWitty
    Commented Nov 16, 2020 at 10:20
  • @dWitty: You can get commits on the other branches by adding /<branch-name> to the end of the URL. I guess you only can see one branch at the time, though.
    – Lii
    Commented Nov 17, 2020 at 7:22
  • 2
    Why're these links hidden now!?
    – j4hangir
    Commented Jan 9, 2021 at 16:37
  • Is there really no button that links to this URL? Do I really have to manually enter it?
    – Niko O
    Commented Jul 19, 2021 at 18:39
  • 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
    Commented Jul 26, 2021 at 20:52
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.

0
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.

8

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.

2
  • 1
    Thanks. I was hoping for a nonAPI approach. 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. Commented Nov 26, 2015 at 2:04
  • 4
    Kinda lame it's not in GitHub by default.
    – ptkato
    Commented Oct 30, 2016 at 3:03
7

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!

3
  • O wonderful. Github should add this feature by deafult. Commented May 16, 2023 at 16:29
  • it does not work Commented Aug 31 at 7:52
  • Hey, Please try again. This has been fixed. Commented Aug 31 at 13:56
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.

1

enter image description here

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

1
  • Does this only apply when the repository is mirrored to another via a particular workflow? Commented Nov 22, 2022 at 14:20
1

If your concern is monitor any commit across all the branches for a specific repository then github provides a better way via email notifications now.

Simply go to following url and add your email here as shown. Replace <user_name> with github username of that repository and <repository_name> with that specific repository which you want to track. Please see 2nd image snapshot if not clear regarding address route.

https://github.com/<user_name>/<repository_name>/settings/notifications

Subscribe to live push requests to github

Subscribe to live push requests to github

Now you can add your email and it'll subscribe to all the push events.

You'll get the emails like in the following format for all commits across any of the branches. Email Received format

You can learn more about github email delivery notifications here.

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
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.

0

Not exactly the asked for question (to see commits on all branches), but to see a commit on a specific branch of a github repository -

https://github.com/<repository_name>/commits/<branch_name>?author=<user_name>

eg.

Repository: langchain-ai/langchain

Branch: master

Author: sepiatone

https://github.com/langchain-ai/langchain/commits/master?author=sepiatone

0

Apparently, on the bottom right side of your GitHub repository page you can see contributors. You can click deployments which is under contributors. Clicking it helps you see every single commit you made.

-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

-3

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

git log

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.