Skip to content

Instantly share code, notes, and snippets.

View fed-franz's full-sized avatar

Federico Franzoni fed-franz

View GitHub Profile
@fed-franz
fed-franz / git-author-rewrite.sh
Last active August 22, 2019 10:27 — forked from octocat/git-author-rewrite.sh
Added OLD_NAME name replacement
#!/bin/sh
git filter-branch --env-filter '
OLD_EMAIL="your-old-email@example.com"
OLD_NAME="You Old Name"
CORRECT_NAME="Your Correct Name"
CORRECT_EMAIL="your-correct-email@example.com"
if [ "$GIT_COMMITTER_EMAIL" = "$OLD_EMAIL" ]
then
export GIT_COMMITTER_NAME="$CORRECT_NAME"