Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Git push error: does not match your user account

Tags:

git

gerrit

I executed the following commands:

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>

But I got the following error after the "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

I have no idea how to fix it.

like image 866
LayaCCC Avatar asked Nov 17 '16 09:11

LayaCCC


1 Answers

You can run these commands:

git config --global user.name "Your Name"
git config --global user.email [email protected]

Then run this to edit the commit to reset the author:

git commit --amend --reset-author
like image 137
Bhargava GM Avatar answered Oct 03 '22 23:10

Bhargava GM