Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Delete username from a Git repository

Tags:

git

git-config

I am getting this warning when I try to set my user name in Tower:

warning: user.name has multiple values

I have checked in a terminal window and found that I have three usernames:

macmini:HiBye shannoga$ git config --get-all user.name Shani shani shani 

How can I delete two of the user names?

like image 553
shannoga Avatar asked Jun 05 '11 14:06

shannoga


People also ask

How do I reset my Git username and password?

Go to Control Panel > User Accounts > Credential Manager > Windows Credentials. You will see Git credentials in the list (e.g. git:https://). Click on it, update the password, and execute git pull/push command from your Git bash and it won't throw any more error messages.


2 Answers

Use git config -e and you should see something like:

[user]     name = Shani     name = shani     name = shani 

Delete the lines you don't want.

like image 168
svick Avatar answered Sep 20 '22 11:09

svick


This worked for me on my Mac:

git config --global --unset-all user.name 
like image 25
Aesch Avatar answered Sep 16 '22 11:09

Aesch