Skip to content

Instantly share code, notes, and snippets.

@rodrigodev
Created March 23, 2020 14:28
Show Gist options
  • Save rodrigodev/d6cf589ec151b728d18d7d547400754e to your computer and use it in GitHub Desktop.
Save rodrigodev/d6cf589ec151b728d18d7d547400754e to your computer and use it in GitHub Desktop.
Rewrite git history to fix wrong email commit
git filter-branch --env-filter 'if [ "$GIT_AUTHOR_EMAIL" = "[email protected]" ]; then
[email protected];
GIT_AUTHOR_NAME="New 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