2022-05-11发表2023-04-23更新技术分享几秒读完 (大约103个字)Git批量修改已提交的邮箱信息新建 rename.sh 内容如下 1234567891011121314151617181920#!/bin/shgit filter-branch --env-filter 'OLD_EMAIL="原邮箱地址"CORRECT_NAME="新用户名"CORRECT_EMAIL="新邮箱地址"if [ "$GIT_COMMITTER_EMAIL" = "$OLD_EMAIL" ]then export GIT_COMMITTER_NAME="$CORRECT_NAME" export GIT_COMMITTER_EMAIL="$CORRECT_EMAIL"fiif [ "$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 使用 git bash 运行 1sh rename.sh 强行提交 1git push origin --force --all Git批量修改已提交的邮箱信息https://cuijunyu.win/20220511/Git批量修改已提交的邮箱信息/作者cuicui发布于2022-05-11更新于2023-04-23许可协议#git