Sometimes you need to rewrite your email in your commits in some git repository. Do it with command:
git filter-branch --env-filter 'if [ $GIT_AUTHOR_EMAIL = bad@email ]; then GIT_AUTHOR_EMAIL=correct@email; fi; export GIT_AUTHOR_EMAIL'
For your collaborators this operatioin might be dangerous. According to Jakub Narębski collaborators will need to:
- if they didn’t base their work on history pre-rewrite, just
git reset --hard origin/master
or justgit pull origin
(which should fast-forward). - If they based their change, they have to rebase using
git rebase origin/master
or justgit pull --rebase origin
More info: