-
-
Save eliwjones/7418449 to your computer and use it in GitHub Desktop.
Future Git.
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 | |
# fgit 48 commit -a -m "I am 48 hours into the future! For amusement only." | |
# For daring madmen or sleazy conmen, try: | |
# git fetch && git rebase | |
function fgit() { | |
local NOWEPOCH=$(date +%s) | |
local INTO_FUTURE=$(($1*60*60)) | |
shift | |
local COMMIT_DATE=$(($NOWEPOCH + $INTO_FUTURE)) | |
env GIT_AUTHOR_DATE=$COMMIT_DATE GIT_COMMITTER_DATE=$COMMIT_DATE git "$@" | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment