Renaming your username in Git commits

This script will do the trick:

git filter-branch -f --commit-filter '
    if [ "$GIT_AUTHOR_NAME" = "Dead Name" -o "$GIT_COMMITTER_NAME" = "Dead Name" ];
    then
        GIT_AUTHOR_NAME="Actual Name";
        GIT_COMMITTER_NAME="Actual Name";
        git commit-tree "$@";
    else
        git commit-tree "$@";
    fi' HEAD

Caveats:

Notes:

Source: https://stackoverflow.com/a/2931914