Last Updated: February 25, 2016
·
768
· derhasi

Replace git author mail in history

Sometimes you or one of your coworkers accidently used the wrong author mail (ode rdid not set up the correct one) for committing changes. To change that you can use the following command:

git filter-branch --env-filter 'if [ $GIT_AUTHOR_EMAIL = old@example.com ]; then GIT_AUTHOR_EMAIL=new@example.org; fi; export GIT_AUTHOR_EMAIL' -f

1 Response
Add your response

Hi, Johannes! Do you know if this command refresh commit date or not?

over 1 year ago ·