I have a college project due at 11:59pm that needs a git repository be handed in. I don't want whoever is marking my assignment to see I started on the day it's due so i used the git-redate tool to set my commits back about a week ago. Is there any way that the marker can see that I changed the date or see the original date? I'm sorry English is not my first language.
Asked
Active
Viewed 145 times
1
-
As long as you hand in in time, what is the problem in starting (to commit) on th elast day? – knittl Mar 28 '21 at 19:53
-
@knittl I find it to be embarrassing and now I am curious if it is possible for the future – MasterofLiu Mar 28 '21 at 19:57
-
2Each commit has 2 dates. Author Date, and Commit Date--- no more, no less. If you want to see what they are, use `git show --summary --pretty=fuller` or `git log --pretty=fuller` – eftshift0 Mar 28 '21 at 20:38
-
Personally, I'd find it way more embarrassing if I had to fake any part of my submission and worse, get called out on it. – knittl Mar 29 '21 at 06:43
1 Answers
0
Considering git-redate
includes
export GIT_AUTHOR_DATE="$DATE_NO_SPACE"
export GIT_COMMITTER_DATE="$DATE_NO_SPACE";
That means it changes both the author and committer date: you would not see the original date after such an operation.
As long as there is no other copy/clone of that repository, the original date would not be visible.
Unless, as commented, the maker does have access to your local cloned repository (through git reflog
). If said local repository is on your personal laptop, that is not likely.
You could force a git gc
to cleanup everything.

VonC
- 1,262,500
- 529
- 4,410
- 5,250
-
Unless of course you were to just zip up the `.git` folder after running `git-redate`. The repository likely still has the old commits reachable through the reflog or sitting around in "dangling" state. You need to make sure to clean up all those old objects first (gc? reflog expire? prune? simplest would be to create a new clone) – knittl Mar 29 '21 at 05:29
-
@knittl Agreed. The OP was "Is there any way that the marker can see that I changed the date or see the original date?": that would means the maker does have access to that folder. Which might not be the case. – VonC Mar 29 '21 at 05:31