shannoga shannoga - 3 months ago 8
Git Question

Delete username from a Git repository

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

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

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

Delete the lines you don't want.