Skip to content

Instantly share code, notes, and snippets.

@rm--
Last active July 19, 2022 08:36
Show Gist options
  • Select an option

  • Save rm--/2b2cc95ff2e8ec1eebf06f065977b836 to your computer and use it in GitHub Desktop.

Select an option

Save rm--/2b2cc95ff2e8ec1eebf06f065977b836 to your computer and use it in GitHub Desktop.
git filter-branch replace author commiter email

all branches and tags:

git filter-branch --env-filter 'GIT_AUTHOR_EMAIL=<author mail adress> GIT_COMMITTER_EMAIL=<committer mail adress>' -- --all

last three commits

git filter-branch --env-filter 'GIT_AUTHOR_EMAIL=<author mail adress> GIT_COMMITTER_EMAIL=<committer mail adress>' HEAD~3..HEAD
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment