Created
November 17, 2014 14:54
-
-
Save alojzije/8cd984b3b84eb6464539 to your computer and use it in GitHub Desktop.
Change timestamp (date/time) of old pushed commits
This file contains hidden or 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
#!/bin/bash | |
git filter-branch --env-filter \ | |
'if [ "$GIT_COMMIT" = "5c772109e23dce7d45276453de4e7a1a6fab2548" ] | |
then | |
export GIT_AUTHOR_DATE="Sun Nov 16 22:00:12 2014 +0100" | |
export GIT_COMMITTER_DATE="Sun Nov 16 22:01:38 2014 +0100" | |
elif [ $GIT_COMMIT = "e3f382f901b9201acdbc5f9b5c46e5bb9b0aae02" ] | |
then | |
export GIT_AUTHOR_DATE="Sun Nov 16 22:34:21 2014 +0100" | |
export GIT_COMMITTER_DATE="Sun Nov 16 22:34:55 2014 +0100" | |
fi' | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
add, change or remove desired commits
and run
bash {path/}gitTimeStampChange