Last active
October 12, 2018 21:28
-
-
Save fel-cesar/d4ac254a2175841e4a0b3cfebc22a352 to your computer and use it in GitHub Desktop.
This snippet is meant to ovewrite the author and committer date locally . BEFORE PUSHED!!!!!!
Remember to change the <COMMIT_HASH> adn the <NEW_DATE> according to the defined format. It is advised to backup your repository locally before using the sc
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
#DATE FORMAT - e.g. 'Mon Jun 19 21:20:50 2017 -0300' | |
git filter-branch --env-filter \ | |
'if [ $GIT_COMMIT = <COMMIT_HASH> ] | |
then | |
export GIT_AUTHOR_DATE=“<NEW_DATE>" | |
export GIT_COMMITTER_DATE="<NEW_DATE>" | |
fi' -f |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment