Last active
March 3, 2022 16:28
-
-
Save weeebdev/8249f1b33ef35be1dd99c15a5ba86f7e to your computer and use it in GitHub Desktop.
Commit files in the past or any date you want. Supports human writable dates like '10 days ago'
This file contains 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 DATE=$(date -d "$1"); then | |
echo $DATE; | |
else | |
exit 0; | |
fi | |
GIT_AUTHOR_DATE="$DATE" GIT_COMMITTER_DATE="$DATE" git commit "${@:2}"; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment