【发布时间】:2022-01-30 05:46:02
【问题描述】:
我执行了以下命令:
git pull <partner_remote> <partner_branch>
git config user.email <my_email>
git config user.name <my_name>
git commit --amend --reset-author
git push <my_remote> HEAD:refs/for/<my_branch>
但是“git push”之后出现如下错误:
remote: ERROR: In commit b6b74fff7850c4b61a5535519959b1ab58ca6fa9
remote: ERROR: committer email address aaa@aaa
remote: ERROR: does not match your user account.
remote: ERROR:
remote: ERROR: The following addresses are currently registered:
remote: ERROR: bbb@bbb
remote: ERROR:
remote: ERROR: To register an email address, please visit:
remote: ERROR: http://xxxxxxxx
我不知道如何解决它。
【问题讨论】:
-
您或其他人最近是否更改了您的 Git 帐户中的元数据?
-
不行,我的账号只有我可以使用,其他人不能使用我的账号。
-
上面的 Git 命令(以
git pull...开头)是在错误之前还是之后运行的?如果之后,那么问题很可能是您更改了用户凭据,并且 repo 主机不喜欢它。 -
Git 命令在错误之前运行。
-
您为什么要更改您的信息?这可能会导致您的 Git 历史记录出现问题,从而难以跟踪您以前的工作。