Skip to content

Instantly share code, notes, and snippets.

@en9inerd
Last active December 20, 2021 06:24
Show Gist options
  • Save en9inerd/ba547b437fceefb6a68d360473a4f78a to your computer and use it in GitHub Desktop.
Save en9inerd/ba547b437fceefb6a68d360473a4f78a to your computer and use it in GitHub Desktop.
committer email fix
git filter-branch --commit-filter '
if [ "$GIT_COMMITTER_EMAIL" = "<old-email>" ];
then
GIT_COMMITTER_NAME="<name>";
GIT_AUTHOR_NAME="<name>";
GIT_COMMITTER_EMAIL="<noreply-email>";
GIT_AUTHOR_EMAIL="<noreply-email>";
git commit-tree "$@";
else
git commit-tree "$@";
fi' HEAD
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment