I'm still new to github, I created a lot of projects in the past but I didn't push them . So I wonder, can someone create a repo in the past and push his code with past dates ? I tried to change my pc time & date but it didn't work .
CodePudding user response:
It is possible to change commit's date. Actually there are two dates, commit date and author date. To change commit date set GIT_COMMITTER_DATE
. Then use git commit --amend --no-edit
.
To change author date, use git commit --amend --no-edit --date="new date"
CodePudding user response:
The date a commit was made will show up on the commit. Just create a new repo, push your existing content into it and the commits will have the date as they are in your local repo. The data s stored as part of the commit metadata.