Change Git Author/Committer Name and eMail in the History

This happens to me all the time: I have a default and set in the global git config, but when I work on a project I sometimes must use another name. Usually I change it before my first commit, but that’s more the exception than the case. And just now I realized that I can change the commiter name/email in a working repository for all my previous commits. Awesome!! And it’s a one-liner:

git filter-branch --env-filter 'GIT_AUTHOR_NAME="pubmem";GIT_AUTHOR_EMAIL="";GIT_COMMITTER_NAME="pubmem";GIT_COMMITTER_EMAIL="";' HEAD


Don’t do this when working with git-svn! 😉


  1. No trackbacks yet.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: