I want to change my history.
Is it possible to change commit date or make new commit with outdated date?
I think only about system date changing.
If you want to commit to a even older date, say 3 days back, just change the date argument: date -v-3d . That's really useful when you forget to commit something yesterday, for instance. Show activity on this post. In my case, while using the --date option, my git process crashed.
It implies that, it is impossible to change file, date, and commit message and any other data from the Git database without knowing Git.
Hide commit history on Git Branch First, create a new temporary branch and checkout. Now, add all the current files to this temporary branch. Create a new commit. Rename the temporary branch to your old branch name.
Roughly speaking, if the diff between the old and new version is bigger than the new version itself, it's a "rewrite". This is tuned for git's original use case of changing source files, most often making localised changes: since it is based on a line-by-line diff, things like reindenting a source file can trigger it.
Use the --date
option when you commit:
git commit --date "Wed Feb 16 14:00 2037 +0100"
Here are the supported date formats:
https://git-scm.com/docs/git-commit#_date_formats
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With