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
Written by Johannes Haseitl
Related protips
1 Response
Hi, Johannes! Do you know if this command refresh commit date or not?
over 1 year ago
·
Have a fresh tip? Share with Coderwall community!
Post
Post a tip
Best
#Git
Authors
khasinski
591.1K
dmichaelavila
500.4K
Sponsored by #native_company# — Learn More
#native_title#
#native_desc#