Skip to content

Instantly share code, notes, and snippets.

@danrspencer
Last active June 15, 2018 20:50
Show Gist options
  • Save danrspencer/a8b6c4818280db5da6891b1365669b1b to your computer and use it in GitHub Desktop.
Save danrspencer/a8b6c4818280db5da6891b1365669b1b to your computer and use it in GitHub Desktop.
Fix Committer Email
#!/usr/bin/env bash
git config user.email "[email protected]"
git filter-branch -f --env-filter '
NAME="Dan Spencer"
EMAIL="[email protected]"
if [ "$GIT_COMMITTER_NAME" = "$NAME" ]
then
export GIT_COMMITTER_EMAIL="$EMAIL"
fi
if [ "$GIT_AUTHOR_NAME" = "$NAME" ]
then
export GIT_AUTHOR_EMAIL="$EMAIL"
fi
' --tag-name-filter cat -- --branches --tags
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment