Skip to content

Commit e0ee0a9

Browse files
author
root
committed
set variables
0 parents  commit e0ee0a9

File tree

1 file changed

+19
-0
lines changed

1 file changed

+19
-0
lines changed

set.sh

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
#!/bin/sh
2+
3+
git filter-branch --env-filter '
4+
5+
OLD_EMAIL="错误记录里的邮箱"
6+
CORRECT_NAME="github账户名"
7+
CORRECT_EMAIL="正确的账户邮箱"
8+
9+
if [ "$GIT_COMMITTER_EMAIL" = "$OLD_EMAIL" ]
10+
then
11+
export GIT_COMMITTER_NAME="$CORRECT_NAME"
12+
export GIT_COMMITTER_EMAIL="$CORRECT_EMAIL"
13+
fi
14+
if [ "$GIT_AUTHOR_EMAIL" = "$OLD_EMAIL" ]
15+
then
16+
export GIT_AUTHOR_NAME="$CORRECT_NAME"
17+
export GIT_AUTHOR_EMAIL="$CORRECT_EMAIL"
18+
fi
19+
' --tag-name-filter cat -- --branches --tags

0 commit comments

Comments
 (0)