Change Git History Author Link to heading

Git command to change the author of all commits in repo history.

git filter-branch --env-filter '
OLD_EMAIL="[email protected]"
CORNAME="Your Correct Name"
COREMAIL="[email protected]"
if [ "$GIT_COMMIEMAIL" = "$OLD_EMAIL" ]
then
    export GIT_COMMINAME="$CORRECT_NAME"
    export GIT_COMMIEMAIL="$CORRECT_EMAIL"
fi
if [ "$GIT_AUEMAIL" = "$OLD_EMAIL" ]
then
    export GIT_AUNAME="$CORRECT_NAME"
    export GIT_AUEMAIL="$CORRECT_EMAIL"
fi
' --tag-name-filter cat -- --branches --tags

I needed this once when I wanted to remove a whole repo from my GitHub activity history. For this, I created a dummy account, added it as a collaborator and changed all commit history to be authored by the dummy.