Skip to content

Commit

Permalink
Create renamesh.sh
Browse files Browse the repository at this point in the history
  • Loading branch information
hero1s committed May 8, 2024
1 parent 672ac6e commit 3b956e8
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions renamesh.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
#!/bin/sh

git filter-branch --env-filter '
OLD_EMAIL="toney.yin@idreamsky.com"
CORRECT_NAME="hero1s"
CORRECT_EMAIL="hero1s@qq.com"
if [ "$GIT_COMMITTER_EMAIL" = "$OLD_EMAIL" ]
then
export GIT_COMMITTER_NAME="$CORRECT_NAME"
export GIT_COMMITTER_EMAIL="$CORRECT_EMAIL"
fi
if [ "$GIT_AUTHOR_EMAIL" = "$OLD_EMAIL" ]
then
export GIT_AUTHOR_NAME="$CORRECT_NAME"
export GIT_AUTHOR_EMAIL="$CORRECT_EMAIL"
fi
' --tag-name-filter cat -- --branches --tags

0 comments on commit 3b956e8

Please sign in to comment.