Git – rewriting author/email of your last git commits

How to modify your last n commits author/email

While writing some code and pushing some git commits, I’ve just found out that I was using a wrong <author>,<email> value for this repository.

Then after few minutes of “Googleing”, I found that git has some good tool

After searching on the web the best way to do it (see mentioned sources), I’ve manage to fix it using the git filter-branch command within a bash script

Don’t forget to enclose each variables with “‘”(single quote enclosed by double quote)

Don’t forget to modify your git configuration like this

Then push the modified commit to your remote repo


Git tools – Rewriting history

Stack Overflow – git edit authors name in commit range, script

Leave a Reply

Your email address will not be published. Required fields are marked *

Back to Top