Skip to content

Instantly share code, notes, and snippets.

View fed-franz's full-sized avatar

Federico Franzoni fed-franz

  • Dusk Network
  • Barcelona
View GitHub Profile
@fed-franz
fed-franz / git-author-rewrite.sh
Last active August 23, 2024 14:24 — forked from octocat/git-author-rewrite.sh
Added OLD_NAME name replacement
#!/bin/sh
git filter-branch --env-filter '
OLD_EMAIL="[email protected]"
OLD_NAME="You Old Name"
CORRECT_NAME="Your Correct Name"
CORRECT_EMAIL="[email protected]"
if [ "$GIT_COMMITTER_EMAIL" = "$OLD_EMAIL" ]
then
export GIT_COMMITTER_NAME="$CORRECT_NAME"