How Can I change the date of a git commit

Viewed 2767

I need to push some code upstream into my repo. However I would like to see if It is possible to set the date of the commit/push to be something other than the current the date.This would mean if someone visited my github page and my desired date for the push was 00/00/00 it would show as 00/00/00 and NOT the current date.Is there anyway to do this?

1 Answers

You can change the date of last commit:

git commit --amend --no-edit --date=now

or input date:

git commit --amend --no-edit --date="2020.11.02 12:00"
Related