Commiter email address does not match in IntelliJ even changing it to correct one

Tadas Davidsonas picture Tadas Davidsonas · Jul 27, 2015 · Viewed 41.5k times · Source

When I try to push my commits from git repository to gerrit remote repository from Linux environment in IntelliJ idea I get the following error:

remote: ERROR:  committer email address ***** [K
remote: ERROR:  does not match your user account.[K

Even if I changed the settings to the correct ones for git and gerrit (I can see that at: git config -l from console), it still picks the old "wrong" email.

What could be wrong?

Answer

Frederic Henri picture Frederic Henri · Jul 27, 2015

you need to reconfigure your email

$ git config user.email <your email>
$ git commit --amend --reset-author

git commit --amend updates your last commits