Skip to content

Instantly share code, notes, and snippets.

Last active Aug 29, 2015
What would you like to do?
Change git commit time
if [ -z "$1" ]; then
echo "Didn't pass in option for date -d"
exit 1
newdate=$(date -d "$1")
export GIT_AUTHOR_DATE=$newdate
export GIT_COMMITTER_DATE=$newdate
git commit
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment