git-filter-repo is a Python program that is generally recommended over Git filter-branch and BFG Repo Cleaner. Other users of your repo will get an “unrelated history” error so they will have to reset or reclone the repo.
Suppose an incorrect email address was used to make previous Git commits. To update Git commit email address history from the Git repo directory:
git filter-repo --mailmap mailmap --force
where file “mailmap” has mailmap file format email addresses to change like:
Jane Doe <firstname.lastname@example.org> <email@example.com> John Smith <firstname.lastname@example.org> <email@example.com>