Delete username from a Git repository

shannoga picture shannoga · Jun 5, 2011 · Viewed 58.5k times · Source

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?

Answer

svick picture svick · Jun 5, 2011

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

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

Delete the lines you don't want.