How to change committer email address during git push

46,715 views
Skip to first unread message

Gouranga Panigrahi

unread,
Sep 27, 2013, 1:33:17 AM9/27/13
to repo-d...@googlegroups.com
Hi,

I was trying to do a git push to https://gerrit.googlesource.com/gerrit and got the below error :

Pushing to https://gerrit.googlesource.com/gerrit
POST git-receive-pack (11557 bytes)
remote: Resolving deltas: 100% (76/76)           remote: Resolving deltas: 100% (76/76)       
remote: Processing changes: refs: 1        remote: Processing changes: refs: 1, done           
remote:
remote: ERROR:  In commit 0a99723fd7039844ce697997916910ce11bdcb4a       
remote: ERROR:  committer email address mani_c...@yahoo.co.in       
remote: ERROR:  does not match your user account.       
remote: ERROR:       
remote: ERROR:  The following addresses are currently registered:       
remote: ERROR:    mani.c...@tcs.com       
remote: ERROR:       
remote: ERROR:  To register an email address, please visit:       
remote: ERROR:  https://gerrit-review.googlesource.com/#/settings/contact       
remote:
remote:
To https://gerrit.googlesource.com/gerrit

I need to change the committer email address from mani_c...@yahoo.co.in to mani.c...@tcs.com.
Please help me on this.

David Pursehouse

unread,
Sep 27, 2013, 1:47:48 AM9/27/13
to Gouranga Panigrahi, repo-d...@googlegroups.com
$ git config --global user.email mani.c...@tcs.com

$ git commit --amend

Gouranga Panigrahi

unread,
Sep 27, 2013, 2:13:40 AM9/27/13
to repo-d...@googlegroups.com, Gouranga Panigrahi

 Hi David,

I executed the above queries but still i am getting the same error.

Edwin Kempin

unread,
Sep 27, 2013, 2:45:41 AM9/27/13
to Gouranga Panigrahi, Repo and Gerrit Discussion



2013/9/27 Gouranga Panigrahi <goura...@gmail.com>
Then it's likely that you have locally created several commits which are included in the push.
git commit --amend only updates the last commit, if you have more commits to update use interactive rebase
to rewrite those commits:
 http://stackoverflow.com/questions/3042437/change-commit-author-at-one-specific-commit
 

--
--
To unsubscribe, email repo-discuss...@googlegroups.com
More info at http://groups.google.com/group/repo-discuss?hl=en
 
---
You received this message because you are subscribed to the Google Groups "Repo and Gerrit Discussion" group.
To unsubscribe from this group and stop receiving emails from it, send an email to repo-discuss...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

kodanda rami reddy vallabhareddy

unread,
Mar 26, 2015, 11:38:04 AM3/26/15
to repo-d...@googlegroups.com
$ git config user.email yournewemail@example.org
$ git commit --amend --reset-author

This commands will work

Manish Singh

unread,
Aug 17, 2015, 3:46:59 AM8/17/15
to Repo and Gerrit Discussion
The above works basically the file that is being commited most likely has a line Signed off by, this is containing the other email address. Just fix the name and the email id there and it will work.
Reply all
Reply to author
Forward
0 new messages