# Changing Author E-Mail in Git ```bash git filter-branch --commit-filter ' if [ "$GIT_COMMITTER_NAME" = "<Old Name>" ] && [ "$GIT_COMMITTER_EMAIL" = "<Old Email>" ] then GIT_COMMITTER_NAME="<New Name>"; GIT_AUTHOR_NAME="<New Name>"; GIT_COMMITTER_EMAIL="<New Email>"; GIT_AUTHOR_EMAIL="<New Email>"; git commit-tree "$@"; else git commit-tree "$@"; fi' HEAD ``` Execute the above in the git shell if running on Windows. Notice the `HEAD` argument. This will analyze the whole history. If you want to limit to say the last 10 commits replace that with `HEAD~10..HEAD`. The above does not always work for some reason. See some alternative suggestions here: https://stackoverflow.com/questions/2919878/git-rewrite-previous-commit-usernames-and-emails