修改已提交的用户名与邮箱
# 命令行执行
git filter-branch --env-filter '
oldEmail="71479461+ok1996@users.noreply.github.com"
newName="ok1996"
newEmail="ku29@qq.com"
if [ "$GIT_COMMITTER_EMAIL" = "$oldEmail" ]; then
export GIT_COMMITTER_NAME="$newName"
export GIT_COMMITTER_EMAIL="$newEmail"
fi
if [ "$GIT_AUTHOR_EMAIL" = "$oldEmail" ]; then
export GIT_AUTHOR_NAME="$newName"
export GIT_AUTHOR_EMAIL="$newEmail"
fi
' --tag-name-filter cat -- --branches --tags
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
# 更新远程仓库
git push -f
1
上次更新: 2023/03/10, 09:02:56