Skip to content

Instantly share code, notes, and snippets.

@mhluska
Created April 2, 2013 19:11
Show Gist options
  • Save mhluska/5295248 to your computer and use it in GitHub Desktop.
Save mhluska/5295248 to your computer and use it in GitHub Desktop.
Change the author and commit dates of a commit.
#!/bin/bash
git filter-branch -f --env-filter \
"if [ \$GIT_COMMIT = ${1} ]
then
export GIT_AUTHOR_DATE=\"${2}\"
export GIT_COMMITTER_DATE=\"${2}\"
fi"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment