Created
January 26, 2018 12:46
-
-
Save jyhsu2000/4812eaffa29f8edd50578a044141e370 to your computer and use it in GitHub Desktop.
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
# clear previous backup | |
rm -rf "$(git rev-parse --git-dir)/refs/original/" | |
commit="$1" | |
date=$(date -d "$2" +%s) | |
git filter-branch --env-filter \ | |
"if [ \$GIT_COMMIT = '$commit' ]; then | |
export GIT_AUTHOR_DATE='$date' | |
export GIT_COMMITTER_DATE='$date' | |
export GIT_COMMITTER_NAME="\$GIT_AUTHOR_NAME" | |
export GIT_COMMITTER_EMAIL="\$GIT_AUTHOR_EMAIL" | |
fi" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment