Change Git Commit Time Stamp

On Ubuntu:

git commit --amend --date `date -Iseconds --date "\date -Iseconds` -12 hours"`

On macOS:

GIT_AUTHOR_DATE=`date -R -v-5H`

GIT_COMMITER_DATE=$GIT_AUTHOR_DATE git commit --amend --date "$GIT_AUTHOR_DATE"

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.