Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

github show commits on a specific date

Tags:

I can show/search a list of commits on a specific branch on github like this

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

I can also filter by author name like

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

But I am looking for a way that I can search my commits on a specific date or date range. I tried to find an existing answer but could not find. I also tried some queries like before=2016-07-27 or after=2016-07-27 but it did not work. Any help will be appreciated. Thanks in advance

like image 752
Zohaib Ijaz Avatar asked Jul 28 '16 14:07

Zohaib Ijaz


People also ask

How do I see exact commit time on GitHub?

Hover over the 'xx days ago' label on the right-hand side, pause and wait for the Tooltip to appear. Hover over the 'xx days ago' label next to the relevant commit under the History tab, pause and wait for the Tooltip to appear.

How do I reference a specific commit?

To reference a commit, simply write its SHA-hash, and it'll automatically get turned into a link.


2 Answers

Per GitHub's REST API v3 documentation for list commits on a repository:

GET /repos/:owner/:repo/commits 

includes since and until parameters:

+--------+---------+---------------------------------------------------------------+ | Name   |  Type   |                          Description                          | +--------+---------+---------------------------------------------------------------+ | since  | string  | Only commits after this date will be returned.                | |        |         | This is a timestamp in ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ. | | until  | string  | Only commits before this date will be returned.               | |        |         | This is a timestamp in ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ. | +--------+---------+---------------------------------------------------------------+ 

For example, to select commits on master in June 2018 on github/linguist: https://github.com/github/linguist/commits/master?since=2018-05-31&until=2018-07-01

According to the above-linked docs, the branch should be included as a query parameter, e.g. https://github.com/github/linguist/commits?branch=master&since=2018-05-31&until=2018-07-01 but it seems to work fine to use the branch name as a path parameter.

like image 189
eddies Avatar answered Sep 18 '22 12:09

eddies


When you click on Network (the number next to fork) you can at least browse by date.

For easier navigation use the cursor keys (shift left for the first commit). Click on a bullet to go to that commit.

like image 31
laktak Avatar answered Sep 22 '22 12:09

laktak