Skip to content

Instantly share code, notes, and snippets.

@m4s0
Created August 21, 2015 23:52
Show Gist options
  • Save m4s0/c0d7a7c6e50db6412171 to your computer and use it in GitHub Desktop.
Save m4s0/c0d7a7c6e50db6412171 to your computer and use it in GitHub Desktop.
#!/usr/bin/env bash
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
@KevinDenys
Copy link

How can you remove the old ones? Because now I have "double" commits

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment