set git alias (windows cmd or linux bash)
git config --global --edit
In the "alias" section:
[alias]
change-commits = "!f() { VAR=$1; OLD=$2; NEW=$3; shift 3; git filter-branch --env-filter \"if [ \\\"$`echo $VAR`\\\" = '$OLD' ]; then export $VAR='$NEW'; fi\" $@; }; f "
check result
git config --global alias.change-commits
# !f() { VAR=$1; OLD=$2; NEW=$3; shift 3; git filter-branch --env-filter "if [ \"$`echo $VAR`\" = '$OLD' ]; then export $VAR='$NEW'; fi" $@; }; f
list all authors
git shortlog -sne
change git author email
change to hidden github-mail https://docs.github.com/en/account-and-profile/setting-up-and-managing-your-github-user-account/managing-email-preferences/setting-your-commit-email-address#setting-your-commit-email-address-on-github
git change-commits GIT_AUTHOR_EMAIL '[email protected]' '[email protected]'
change username
git change-commits GIT_AUTHOR_NAME 'Long Wrong Name' 'shorty'
you can also change the committer data
git change-commits GIT_COMMITTER_NAME 'OLD' 'NEW'
git change-commits GIT_COMMITTER_EMAIL 'OLD' 'NEW'