Skip to content

Instantly share code, notes, and snippets.

View davidplumridge's full-sized avatar

David Plumridge davidplumridge

View GitHub Profile
@davidplumridge
davidplumridge / git-change-name-and-email.txt
Last active August 3, 2024 02:52
Change name & email on git commits
git filter-branch --env-filter '
WRONG_EMAIL="example@exmaple.com"
NEW_NAME="Joe Smith"
NEW_EMAIL="joe.smith@example.com"
if [ "$GIT_COMMITTER_EMAIL" = "$WRONG_EMAIL" ]
then
export GIT_COMMITTER_NAME="$NEW_NAME"
export GIT_COMMITTER_EMAIL="$NEW_EMAIL"
fi