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?
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 ...
Expected behavior: commit in the usual timeframe, usually under 10 seconds, even for large commits. Actual behavior: commit takes 5 minutes or more.
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.
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.
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!
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With