Skip to content

Instantly share code, notes, and snippets.

@itsamenathan
Last active Aug 29, 2015
Embed
What would you like to do?
Change git commit time
#!/bin/bash
if [ -z "$1" ]; then
echo "Didn't pass in option for date -d"
exit 1
fi
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