Home > Mobile >  Using GitHub as proof of code's creation date
Using GitHub as proof of code's creation date

Time:01-21

Is it possible to proof, without a doubt, date of code on GitHub? I know that it is in fact possible to amend the date, and also push code with past date, so is there a way to be absolutely sure that the code with a certain date was actually committed when it says so?

Context:

My team forgot to submit assignment on time, but we did push all the code to the repository before the deadline. We asked if it is still possible to submit the assignment, using GitHub as a proof that the code is, in fact, from before the deadline, but the Professor declined, stating that the date can be faked.

CodePudding user response:

The professor is right that the Git author and commit dates can be faked, but there are things in the Github metadata which cannot.

The "pushed_at" timestamp on a repository is the time of the last push. If your last push to the repo was before the deadline, you could use that as evidence. You can get this via the Github API.

If you used Pull Requests, you can use the timestamps on those to show when that code was submitted and merged.

You can use the Github API to get a list of events on your repository with timestamps. PushEvents will contain what commits were pushed. It should be enough to show that no more code was pushed after the deadline. Or if it was, ask to be allowed to submit the code which was pushed before the deadline.

  • Related