What if you could make git commit in past with time travel?

Kunal Jaykam
Sep 27, 2021
git-commit

Yes, you can make git commit in Past with “Time travel”

Let me show you how, you set the date and time of the past, where you want to make the git commit like it is shown below:

git commit --date='2021-01-01 12:12:00' -m "message"

replace the time and date of your choice, then hit the enter and congratulations you just made a commit in past with one line of command.

But even if that's too much of a hassle for you, and don’t wanna bother with setting up date and time then use this magical command:

git commit --date="10 day ago" -m "Your commit message"

For more short and useful stories like this, please consider subscribing, and if you have any questions feel free to reach out at my Twitter handle @kunaljaykam

--

--

Kunal Jaykam
0 Followers

Code enthusiast unraveling the intricacies of programming through insightful articles.