git filter-branch --commit-filter '
if [ "$GIT_AUTHOR_EMAIL" = "wrong_email@wrong_host.local" ];
then
GIT_AUTHOR_NAME="Your Name Here (In Lights)";
GIT_AUTHOR_EMAIL="correct_email@correct_host.com";
git commit-tree "$@";
else
git commit-tree "$@";
fi' HEAD
Tamika Page <tamika@somejob.com>
Orlando Cervantes <orlando.cervantes@otherjob.com> Orlando Jackson <orlando.jackson@otherjob.com>
Jared Michael <jared.michael@gmail.com> <jared@desktop.(none)>
将导致归属于tamkia@somejob.com的任何提交都显示为Tamika Page,而不管提交者名称如何,归属于Orlando Jackson <orlando.jackson@otherjob.com>的提交显示为Orlando Cervantes,而烦人的<jared@desktop.(none)>提交则归属于jared.michael@gmail.com。有关详细信息,请查看此特性的git文档 -由于它是内置在git中,因此它应该适用于任何新的git客户端。