[GIT] change commit author|date|message 

// change author
git commit --amend --author="AuthorName <email@address.com>"

// change date (current time or specify time)
git commit --amend --date="$(date -R)"
git commit --amend --date="Wed, 04 May 2022 17:55:05+0800"

// change message
git commit --amend -m "Your new message"
// If you want to change all commit's author

git config --global user.name "Your_New_Name"
git config --global user.email "new_email@address.com"

git rebase -i [committed_code] -x "git commit --amend --reset-author -CHEAD"
git rebase -i --root -x "git commit --amend --reset-author -CHEAD"

git push --force
Back