Last active
July 20, 2017 18:44
-
-
Save fel-cesar/9bc41cfa10a153d343ce324356c0a5b4 to your computer and use it in GitHub Desktop.
This gist is for fixing past commits date, be careful because all the subsequent hashes will be also changed. ALWAYS make backup before doing so
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
git filter-branch --env-filter \ | |
'if [ $GIT_COMMIT = <COMMIT_HASH> ] | |
then | |
export GIT_AUTHOR_DATE=“Mon Jun 19 21:20:50 2017 -0300" | |
export GIT_COMMITTER_DATE="<CHANGE DATE ON THE FORMAT ABOVE>" | |
fi' -f |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment