Skip to content

Instantly share code, notes, and snippets.

@AlexKorovyansky
Last active August 29, 2015 14:07
Show Gist options
  • Save AlexKorovyansky/09ebe2617ec261384d92 to your computer and use it in GitHub Desktop.
Save AlexKorovyansky/09ebe2617ec261384d92 to your computer and use it in GitHub Desktop.
Change Git Author/Commiter in all commits
# thanks to http://stackoverflow.com/questions/4981126/how-to-amend-several-commits-in-git
git filter-branch --env-filter 'if [ "$GIT_AUTHOR_EMAIL" = "incorrect@email" ]; then
GIT_AUTHOR_EMAIL=correct@email;
GIT_AUTHOR_NAME="Correct Name";
GIT_COMMITTER_EMAIL=$GIT_AUTHOR_EMAIL;
GIT_COMMITTER_NAME="$GIT_AUTHOR_NAME"; fi' -- --all
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment