Skip to content

Instantly share code, notes, and snippets.

@demoive
Created June 29, 2017 11:55
Show Gist options
  • Save demoive/b26cf3597f3a33a3c6343d0192f91411 to your computer and use it in GitHub Desktop.
Save demoive/b26cf3597f3a33a3c6343d0192f91411 to your computer and use it in GitHub Desktop.
Modify the date of a commit
git filter-branch -f --env-filter \
'if [ $GIT_COMMIT = dad723b0e1993e4626e4d91edcea101389bdd87e ]
then
export GIT_AUTHOR_DATE="Mon Nov 17 16:00:53 2014 +0000"
export GIT_COMMITTER_DATE="Mon Nov 17 16:00:53 2014 +0000"
fi'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment