Hello, I’m a teacher at an university in Germany. I will provide a short explanation of what we planned to do, and conclude with the problem we recently ran into.
In our current term we use GitHub Classroom to manage the repositories of our students. Since the forth homework we use a repository without a deadline for an ongoing development process of an application. Each homework sheet has a deadline written on it. The deadline is always Thursday evening at 11:59 p.m. the following week.
A student came to us last week to discuss his submissions. Each of his 3 submissions where committed Friday night at around 00:50 p.m. This leads to 3 failed attempts in our course, which is why he no longer can attend the exam this semester.
He claimed that he did not miss the deadline but, due to the time difference of his home country and Germany, set his time an hour ahead. He claimed that this was the reason why his commits seemed to be not in time.
While looking at his time settings to see if he is straight up lying to me, I realized he hadn’t changed the time zone to match his home country, but that he manually set the time of his laptop an hour ahead.
At this time I still thought he is trying to fool me. I set up a test repository, committed some stuff and proceeded to manually set the time of my laptop one hour ahead. I committed again and proofed his assertion. The last commit in my repository had a timestamp that was one hour ahead of the actual time. It even got better when I pushed it to a remote repository, set my time back to normal and refreshed GitHub. My last commit was then tagged to be ‘committed in 1 Hour’. First of all, yay time travel, but still, this is a problem.
Steps to recreate
- Git init
- Commit stuff
- Set time an hour ahead
- Commit again
- Push to remote repo on GitHub
- Set time back to normal
- Refresh GitHub and feel like Marty McFly
How can I retrace when the student actually pushed his work?
The first trace of hope I found online was to look into the push logs of GitHub, but I’m no admin of GitHub.com, so I can’t do that.
The second attempt was to use the ‘git reflog’ command, but when cloning the repo the only entry is the clone I just performed.
- Is there a way to see the Push Logs on GitHub or GitHub Classroom without being an admin for the site?
- Is there a clone command that also copies the origin logs? In this case I would be able to use the ‘git reflog origin’ command to see the push timestamps right?
- Is there a better way to manage this kind of weekly deadlines with GitHub Classroom or do I have to build my own cloning scripts?