Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

View commits for a given directory at a particular date in Github

Tags:

github

I want to view all the commits for a given "directory" and after a given date, in Github. I have read Github API documentation and "path" and "since" parameters do the job. https://developer.github.com/v3/repos/commits/#list-commits-on-a-repository

However, I am not able to view them on Github. "Since" parameter seems not to work on Github. Example: https://github.com/torvalds/linux/commits?path=Documentation&since=2016-04-04T16:00:49Z

Any idea how can I achieve this?

Thanks, Leticia

like image 774
letimome Avatar asked Apr 25 '16 17:04

letimome


2 Answers

  • Command line:

    Use git log --since option.

    git log --since="2015-12-01"

    This will tell all commits/actions since December 01 2015. Checkout link Git commit history

EDIT:

  • Git hub:

    As per my research, there is no trivial solution to view github commits "after" a particular day. You can however use compare option to compare repo/branches between two time periods, this will give you a view of commits "after" particular day.

    E.g: The following compares branches between two time periods, thereby listing all commits between this period.

    https://github.com/torvalds/linux/compare/master@{2016-04-14}...master@{2016-04-25}

    Hope, this helps!

    Note: I would recommend command line when possible as it definitely gives you more flexibility.

like image 57
MSameer Avatar answered Oct 02 '22 15:10

MSameer


You could use either this:

git log -- path/ --since="date"

Or this to check a file history

 git log -- path/myfile.txt --since="date"

In github you would have to do this:

https://github.com/torvalds/linux/commits/master@{date}/Documentation

for your particular example:

https://github.com/torvalds/linux/commits/master@{2016-04-04T16:00:49Z}/Documentation
like image 33
raven Avatar answered Oct 02 '22 16:10

raven