Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Git marking all new commits as occurring "3 months ago"

Tags:

git

github

I started a new repo and pushed something to it and my gitlog states that it was created 3 months ago. When I check my github contributions calendar it is listed as being created 3 months ago. All new files I create and commit now are being marked as being committed 3 months ago. How do I reset my git commit date to the current date?

like image 399
chopper draw lion4 Avatar asked Nov 24 '25 20:11

chopper draw lion4


1 Answers

You can use a script in order to change the committer and author date of any git commit:
See "How to push a file to past time?"

git rcd @ "1 hour ago"

Check also if you haven't defined, in your current environment variables, GIT_COMMITTER_DATE or GIT_AUTHOR_DATE: that would explain why creating a new commit doesn't use the current date.

like image 182
VonC Avatar answered Nov 26 '25 14:11

VonC