Hello I am using git version 2.42.0.windows.2
I have a global config.
I am working on another project with a git local config (git config --local) but while pushing git is still using global config user.name.
Can someone help me please.
Thankds in advance
Hi
What command did you use to update you username ?
Just tried and it works fine.
create a new repository and update your username again.
git config user.name newname
Then check on an old global value using repository.
git config --list
Cheers
I used git config user.name newname
but it’s not working. It seems like git push is using user.name defining in the global config (git config --global user.name …)
Hi,
I just did it in a repo
After having changed the user name there are 2 entries returned by the config list. Surely the later supercedes the older. The older comes from global config. The newer is the one I added later.
![image](https://global.discourse-cdn.com/business7/uploads/codewithmosh/original/2X/2/28aa0b48d9f37add880d639b9d870fcddd57058d.png)
On the local side
On GitHub
I notice that it did not take the new commiter name on the second commit. I guess this is because it gives precedence to email which wasn’t changed yet. GitHub uses the email to determine your activity in the profile. So it could simply ignore commiter name.
![image](https://global.discourse-cdn.com/business7/uploads/codewithmosh/original/2X/9/9480c4909eb32a299d06275c8045ce8f2ee192b0.png)
Maybe this is what you are facing.
Cheers.