Changing author name for all git logs

I recently realized I had goofed up with setting up my GIT account with an incorrect name. I found this cool way to update the logs and update the username to the correct one:

Note: This would update all commits so far. If you wanted to modify commits for specific user, then you may have to write a bash script for it. You can find more details here: But the below would work fine if it’s only yourself in the previous logs.
Just execute this command within your GIT home repository:

git filter-branch -f --env-filter "GIT_AUTHOR_NAME='varun.verma'; GIT_AUTHOR_EMAIL=''; GIT_COMMITTER_NAME='varun.verma'; GIT_COMMITTER_EMAIL='';" HEAD 
Posted in GIT

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