I found myself amending my commits quite often. I don\'t stash
so much because I tend to forget I did so, especially when I want to save what I did before I lea
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.)