Changing author (or any other commit attribute) in existing commits
From this SOF Q&A. Linked page was showing a scenario to change committer and author's name and email from old value to new value:
git filter-branch --commit-filter ' if [ "$GIT_COMMITTER_NAME" = "<OLD_NAME>" ]; then GIT_COMMITTER_NAME="<NEW_NAME>"; # ... # modify other attributes if any, then... git commit-tree "$@"; else git commit-tree "$@"; fi' HEAD
Comment in the answer was mentioning
git env-filter will change all commits,
but the one shown above allows conditional behaviour.