首页 > 解决方案 > Git: Cannot change author name/committer name with $ git config --global user.name

问题描述

When I push changes to github, a wrong author name appears. I tried to change the settings globally and for the specific repository with

$ git config --global user.name "Right Name"

and

$ git config user.name "Right Name"

but that didn't help. I deleted the credentials stored in Keychain Access with no success.

I changed the author name only for the next commit with:

$ git commit --author="Right Name <right@name.org>"

It resulted in: "Right Name authored and Wrong Name committed" on Github.

$ git config --list

shows "Right Name" but still on Github the author name is "Wrong Name". What am I doing wrong?

(Please note: I don't need to change the author of previous commits. I just would like to commit with the right author name in the future)

标签: gitmacosgithub

解决方案


推荐阅读