Move ALL git commits dates 1 day into the future

My system time was incorrectly set during a game jam, so all my commits are exactly 24 hours before anyone else’s. I’d like to try doing a filter-branch:

#!/bin/sh

git filter-branch --env-filter '

an="$GIT_AUTHOR_NAME"
ad="$GIT_AUTHOR_DATE"
cd="$GIT_COMMITTER_DATE"

if [ "$GIT_AUTHOR_NAME" = "wilbefast" ]
then
    ad=date_plus_one(ad)
    cd=date_plus_one(cd)
fi

export GIT_AUTHOR_DATE="$ad"
export GIT_COMMITTER_DATE="$cd"
'

I can’t figure out how to parse and modify the date though :S I’m not a bash pro I’m afraid; Any ideas?

  • Error in git install from source on Ubuntu
  • Get git clone progress for dialog --gauge
  • Use of apostrophe (single-quote) in a git commit message via command line?
  • Escaping git bash after reflog, or commit, etc
  • How do I get bash autocomplete to work with git aliases that use shell commands?
  • Dynamic elements in bash PS1
  • Git branch --merged / --no-merged and --squash option
  • Git “git config --global user.name” why does this option exist?
  • How to restore deleted file which got deleted on branch merge?
  • How to rebase a `filter-branch` from a subproject on my main repository's subtree?
  • What data is being signed when you `git commit --gpg-sign=<key-id>`?
  • Record file copy operation with Git
  • One Solution collect form web for “Move ALL git commits dates 1 day into the future”

    GIT_AUTHOR_DATE and GIT_COMMITTER_DATE are in unix time, so you can just add 24 hours worth of seconds to these values (86400 seconds)

    ad=$[ $ad + 86400 ]
    cd=$[ $cd + 86400 ]
    
    Git Baby is a git and github fan, let's start git clone.