git修改历史提交的user.name和user.email信息
1 git filter-branch -f --commit-filter ' 2 if [ "$GIT_AUTHOR_EMAIL" = "wrong@email.com" ]; 3 then 4 GIT_AUTHOR_NAME="correct_name"; 5 GIT_AUTHOR_EMAIL="correct@email.com"; 6 git commit-tree "$@"; 7 else 8 git commit-tree "$@"; 9 fi' -- 【分支名称】
修改name和email值,在git 中执行;