Ever wanted to commit something to a git repo with a past date? Here’s how you could do it.
If you are working on a project and missed a commit yesterday or you accomplished the task but GitHub for Windows bailed on you? Well, this little hack can solve your problem.
Pre-Step.
Pull all data from remote to local repository.
For the same, we are using the --amend and --date switches.
The exact command is as follows:
$ git commit --amend --date="YYYY-MM-DD HH:MM:SS"
Simple, isn't it!
This should solve your problem . If you have any Queries or Suggestions, please reach out to me in the Comments Section below.
Also, have look at my other blogs:
Have fun!
If you have any Queries or Suggestions, please reach out to me in the Comments Section below.
Discussion (0)