Skip to content

Instantly share code, notes, and snippets.

@jonbartlett
Last active May 24, 2016 01:14
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jonbartlett/37bde4cd5fdec7e44e522ff3c537a3fb to your computer and use it in GitHub Desktop.
Save jonbartlett/37bde4cd5fdec7e44e522ff3c537a3fb to your computer and use it in GitHub Desktop.
Blanket update email for commits in a repo
#!/bin/sh
git filter-branch --env-filter '
CORRECT_EMAIL="mail@jaybe.net"
export GIT_COMMITTER_EMAIL="$CORRECT_EMAIL"
export GIT_AUTHOR_EMAIL="$CORRECT_EMAIL"
' --tag-name-filter cat -- --branches --tags
@jonbartlett
Copy link
Author

  • clone new copy of repo
  • run script in new repo dir
  • git push --force --tags origin 'refs/heads/*'
  • delete old repo and re-clone

https://help.github.com/articles/changing-author-info/

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