Last active
January 10, 2020 01:05
-
-
Save pawelrubin/3ed0d8a987870c8c4b020de0fc211446 to your computer and use it in GitHub Desktop.
shell function for making commits with faked date. Just add it to your `~/.bashrc`.
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
function fake_commit { | |
local date=$1 | |
local message=$2 | |
export GIT_{AUTHOR,COMMITTER}_DATE="$(LC_TIME=en_US date -d "$date")" | |
git commit -m "$message" | |
unset GIT_{AUTHOR,COMMITTER}_DATE | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Example usage