Skip to content

Instantly share code, notes, and snippets.

@aanari
Created May 8, 2012 18:48
Show Gist options
  • Save aanari/2638431 to your computer and use it in GitHub Desktop.
Save aanari/2638431 to your computer and use it in GitHub Desktop.
Git Fix Commit Author + Email
git filter-branch --commit-filter '
if [ "$GIT_COMMITTER_EMAIL" = "old@email" ];
then
GIT_COMMITTER_NAME="Full Name";
GIT_AUTHOR_NAME="Full Name";
GIT_COMMITTER_EMAIL="new@email";
GIT_AUTHOR_EMAIL="new@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