Hacking My Way Back In Time

Full Color

Some of you might know I have a 2015 resolution / goal of maintaining a 100% Git activity for the whole year. Presently I have kept up a streak of 48 days. Last night after I committed and pushed my daily work I went to bed assuming everything was peachy. I didn't realize my contribution from my recently formatted laptop, did not contain my correct GitHub username - resulting in losing my streak. Clearly an unacceptable outcome, I decided to hack my way back in time... using Git configuration variables.

                    (the bad commit)
    123 --- ABC --- DEF
  • So I reset my last commit (allowing me to retain local changes)
  • Properly set my git username
  • Added my changes once again
  • And temporarily set my GITAUTHORDATE & GITCOMMITTERDATE on one line with the new commit statement
$ git reset [ABC Sha]
$ git add .
$ GIT_AUTHOR_DATE='Fri Feb 06 21:34 2015 -0500' GIT_COMMITTER_DATE='Fri Feb 06 21:34 2015 -0500' git commit -am "added basic door functionality"

Image Credits: Kung Fury is an over-the-top action comedy. Recently funded on Kickstarter will be available free on the Internet. Check it out and show them some love! ( I get nothing from plugging them, just thought that movie was hilarious )