git强制更新历史的commit用户名邮箱信息
作者:互联网
目录下,创建下面的脚本,执行一下就可以了(注意去除master保护)
git filter-branch -f --env-filter ' OLD_EMAIL="" CORRECT_NAME="cgy1" CORRECT_EMAIL="cgy1@xxx.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
标签:GIT,NAME,--,EMAIL,git,export,commit,用户名,CORRECT 来源: https://www.cnblogs.com/already/p/15947210.html