Closed2
git commit message の Author 変更したい

Author 設定
user name, email を git config
で設定
git config user.name "Your Other Name"
git config user.email "your-other-email@example.com"
確認
git config --get user.name
git config --get user.email

過去の commit の Author 変更
直前の commit だけなら commiit --ammend でいける
git commit --amend --author="New Name <new-email@example.com>"
過去の複数の commit の author を変更したいなら rebase -i で edit 選択してからの commit --amend すれば良い。
大量の過去の commit を一括操作したいならgit-filter-repo を使うといいらしい
このスクラップは2025/03/12にクローズされました