Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Any way in Github.com to see the exact time for a commit or release

Tags:

github

I'm using github for students to submit a programming assignment. And I have a strict deadline for submission and I would like to be able to check the time that their release was submitted.

Unfortunately, github only reports how many days ago a release or commit was made. Is there any (quick) way to get the exact time?

like image 295
Ken Avatar asked Feb 11 '14 10:02

Ken


People also ask

Does git commit record time?

git does not log when things are pushed into a repository (or fetched for that matter), only the two timestamps on the commits themselves, so I don't think there's a reliable way to do this without writing hooks that would store extra metadata somewhere for you, or relying on logging done by git-daemon, ssh, or your ...

How long does a commit take GitHub?

Expected behavior: commit in the usual timeframe, usually under 10 seconds, even for large commits. Actual behavior: commit takes 5 minutes or more.

How do I see commit messages in GitHub?

The short answer is, you cannot search commit messages directly on github.com the website. For the time being we recommend the local git grep solution others on this thread have proposed. At one point in time GitHub did offer a git grep style search over commit messages for a single repository.


2 Answers

If you move your mouse over the xx minutes|hours\... ago label, a tooltip will be displayed showing the UTC time the commit was created at.

Keep in mind that Git history can be rewritten (see git commit --amend or git filter-branch commands for instance) and that this displayed time shouldn't be considered as solid proof.

like image 155
nulltoken Avatar answered Sep 23 '22 09:09

nulltoken


Well I'm jumping into this WAAAYY late, but I wanted to add a note about this particular use case.

nulltoken is absolutely right about the possibility of the times being modified. To circumvent this, I would make use of tags. Slap together a simple script that would pull the branch at the cutoff point, tag it (using an annotated tag), and then push the tag up to github. This gives you a snapshot of the branch at that particular time, stamped the time that the tag was cut AND the name of the tagger. That last part is particularly useful for students who think they are crafty.

https://git-scm.com/book/en/v2/Git-Basics-Tagging

Cheers!

like image 42
ProbablyJody Avatar answered Sep 22 '22 09:09

ProbablyJody