Skip to content

Instantly share code, notes, and snippets.

@toidang92
Created March 12, 2016 11:18
Show Gist options
  • Save toidang92/212f7d5da6ae36c4cda1 to your computer and use it in GitHub Desktop.
Save toidang92/212f7d5da6ae36c4cda1 to your computer and use it in GitHub Desktop.
Change author of many commits
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