Skip to content

Instantly share code, notes, and snippets.

@LuisAlejandro
Last active April 15, 2020 04:43
Show Gist options
  • Save LuisAlejandro/0fdac8fd227b06d13acf809df48a5e90 to your computer and use it in GitHub Desktop.
Save LuisAlejandro/0fdac8fd227b06d13acf809df48a5e90 to your computer and use it in GitHub Desktop.
This command will change the date of a specific commit
# This command will change the date of a specific commit
# Replace <commit-hash> with the actual commit hash
git filter-branch -f --env-filter \
'if [ $GIT_COMMIT = <commit-hash> ]
then
export GIT_AUTHOR_DATE="May 19 16:18:03 2016 -0400"
export GIT_COMMITTER_DATE="May 19 16:18:03 2016 -0400"
fi'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment