Last active
August 29, 2015 14:08
-
-
Save itsamenathan/544dc03bebcb4257fe08 to your computer and use it in GitHub Desktop.
Change git commit time
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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