Update git commit author date when amending

You can change the author date with the --date parameter to git commit. So, if you want to amend the last commit, and update its author date to the current date and time, you can do:

git commit --amend --date="$(date -R)"

(The -R parameter to date tells it to output the date in RFC 2822 format. This is one of the date formats understood by git commit.)

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)