Note that filter-repo deletes remote section in .git\config
git filter-repo --mailmap mymailmap --force
or
git-filter-repo --name-callback 'return name.replace(b"<OLD NAME>", b"<NEW NAME>")'
git filter-branch -f --commit-filter 'git commit-tree -S "$@";' -- --all
or
This option is for signing all commits for specific author name
git filter-branch -f --commit-filter '
if [ "$GIT_AUTHOR_NAME" = "<AUTHOR>" ];
then
git commit-tree -S "$@";
fi' -- --all
git for-each-ref --format="%(refname)" refs/original/ | xargs -n 1 git update-ref -d
git reflog expire --expire=now --all
git gc --prune=now
git push --force --tags origin 'refs/heads/*'