安装(ubuntu)
apt update
apt install git-filter-repo
使用,下面的操作,会把 .git/config 的内容进行修改,所以先做备份
cp .git/config ~/git_config
# 邮箱
git filter-repo --email-callback '
return email.replace(b"旧邮箱", b"新邮箱")
' --force
# 姓名
git filter-repo --name-callback '
return name.replace(b"旧名", b"agocan")
' --force
cp ~/git_config .git/config
推送
git push --force
浙公网安备 33010602011771号