Actually, a better practice is to:
- perform a filter on a freshly cloned repository
- not used git filter-branch anymore, which is declared (as of Git 2.24, Q4 2019) as somewhat deprecated.
You can instead used right now its possible successor: newren/git-filter-repo
(in Python), and its example section:
cd repo
git filter-repo --mailmap my-mailmap
with my-mailmap
:
Correct Name <[email protected]> <[email protected]>
That would replace the author name and email of any commit done by anyone with <[email protected]>
See git mailmap
for the exact syntax of that mapping file.