man*_*lds 25
您将不得不修改git commit --amend --author="New Author Name <email@address.com>"本地存储库上的commit()并强制git push -f推送 - 更改(一旦您向上游推送,重写历史通常是一种不好的做法).
Tar*_*ngh 10
万一你完成了多次git-push而没有意识到提交的是一个不同的电子邮件帐户.现在你需要改变它.这是我用来将我以前的提交转换为新电子邮件ID的不同电子邮件的命令.
git filter-branch -f --env-filter "GIT_AUTHOR_NAME='yourname'; GIT_AUTHOR_EMAIL='youremail@example.com'; GIT_COMMITTER_NAME='yourname'; GIT_COMMITTER_EMAIL='youremail@example.com';" HEAD;
Run Code Online (Sandbox Code Playgroud)