I am working on a project and for multiple reasons, I need a commit of code that I have just completed to have the date of two hours ago. Is there a way to do this? I am not very familiar with git. Usually, I would type in "git commit -m 'message'". Any help would be appreciated.
Asked
Active
Viewed 267 times
1 Answers
1
If what you want to set is the author date, use --date
as suggested above. If you want to set the committer date then:
GIT_COMMITTER_DATE="<some date>" git commit -m 'message'

Wolf
- 4,254
- 1
- 21
- 30