Changing the author of a commit is often useful when backporting commits in a project fork (e.g. applying Batik commits to EchoSVG). For example, to change the author of the last two commits ("1" and "2"), first run:
git rebase -i HEAD~2In the subsequent edit session, change the commands from pick to e. Then run
git commit --amend --author="Commit 1 Author <commit-1-author@example.com>" --no-editwhere the --no-edit prevents modification of the commit message. Now:
git rebase --continue
git commit --amend --author="Commit 2 Author <commit-2-author@example.com>" --no-edit
git rebase --continueAnd the change is done.