GitコミットにはAuthorDateとCommitDateが存在するため両方を修正する必要がある
$ git commit --amend --no-edit --date="2021-09-01T10:10:00+0900"
# 現在日時に設定
$ git commit --amend --no-edit --date $(date --iso-8601=seconds)
コミットを編集状態にする(先頭から3コミット)
$ git rebase -i HEAD~3
変更したいコミットをeditに変えて保存
1 pick 7b92777 Second commit↲
2 pick 1338ca6 Third commit↲
3 pick a505b00 Fourth commit↲
## editモードにする
1 edit 7b92777 Second commit↲
2 edit 1338ca6 Third commit↲
3 edit a505b00 Fourth commit↲
古いコミットから順に修正を行う
$ git commit --amend --no-edit --date="2021-09-01T10:10:00+0900"
# 現在日時に設定
$ git commit --amend --no-edit --date $(date --iso-8601=seconds)
# 次のコミットに移動
$ git rebase --continue
AuthorDateをCommitDateに合わせる
$ git rebase HEAD~3 --committer-date-is-author-date
$ git log --pretty=fuller