Skip to content

Instantly share code, notes, and snippets.

@eliwjones
Last active December 28, 2015 01:09
Show Gist options
  • Save eliwjones/7418449 to your computer and use it in GitHub Desktop.
Save eliwjones/7418449 to your computer and use it in GitHub Desktop.
Future Git.
#!/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