Skip to content

Instantly share code, notes, and snippets.

@debo
Created August 7, 2015 19:04
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save debo/c106f29cf6343af33969 to your computer and use it in GitHub Desktop.
Save debo/c106f29cf6343af33969 to your computer and use it in GitHub Desktop.
#!/usr/bin/env bash
commit="$1"
date="$2"
git filter-branch --env-filter \
"if test \$GIT_COMMIT = '$commit'
then
export GIT_AUTHOR_DATE='$date'
export GIT_COMMITTER_DATE='$date'
fi" &&
rm -rf "$(git rev-parse --git-dir)/refs/original/"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment