Skip to content

Instantly share code, notes, and snippets.

View ya332's full-sized avatar
🎯
Focusing

Yigit Alparslan ya332

🎯
Focusing
View GitHub Profile
@ya332
ya332 / gist:a7dffdc49efbc590883df5faeb08b88a
Created August 13, 2021 07:31
Update past commits' authorship
# source: https://www.git-tower.com/learn/git/faq/change-author-name-email/
git filter-branch -f --env-filter '
WRONG_EMAIL="wrong@email.com"
NEW_NAME="new name"
NEW_EMAIL="no-reply@github.com"
if [ "$GIT_COMMITTER_EMAIL" = "$WRONG_EMAIL" ]
then
export GIT_COMMITTER_NAME="$NEW_NAME"
export GIT_COMMITTER_EMAIL="$NEW_EMAIL"