Thanks for the suggestion but since I have more than one user.name it is preventing. git config --global --unset user.name warning: user.name has multiple values
I found these three things works to recover this situation! 1. git config --global --unset-all user.name 2. git config --global --replace-all user.name <New Name> // My mistake was I was giving --replace-all at the end 3. manually changing .gitconfig I think there can be three issues, 1. git config --global user.name ""firstname surname"" -> This adds only firstname, should not it give some error to user ? 2. If I run previous command repeatedly, they adds new user.name entry for each command, which is wrong. As a result my git config --list output is this: user.name=firstname user.name=firstname user.name=firstname 3. git config --global user.name <New Name> --replace-all should have thrown error since it is not correct usage. Let me know what you think about these... On Saturday, March 26, 2022 at 10:46:27 AM UTC+5:30 eyal...@gmail.com wrote: > Try to run- > > git config --global --unset user.name > > And then re-run the command as it should have been. > > Eyal > > > On Sat, Mar 26, 2022 at 6:26 AM Debanjana Sarkar <debanjana...@gmail.com> > wrote: > >> Hi there, >> >> By mistake I tried to set global user.name with extra quote(like >> ““xyz””) instead of only one (like “xyz”) and now it prevents me to set >> correct user.name. Steps to reproduce this, >> >> 1. >> >> git config --global user.name ““Debanjana Sarkar”” >> output of “git config --list” >> user.name=Debanjana // Surname is missing >> 2. >> >> Now reading manual and try to set the user.name correctly. >> git config --global user.name “Debanjana Sarkar” >> warning: user.name has multiple values >> error: cannot overwrite multiple values with a single value >> Use a regexp, --add or --replace-all to change user.name. >> 3. >> >> Hence I added “–replace-all” but it still did not replace but rather >> added another user.name entry. >> git config --global user.name “Debanjana Sarkar” --replace-all >> git config --list >> user.name=Debanjana >> user.name=Debanjana Sarkar <---------- Another entry instead of >> replacing existing one !! >> >> Reproduced this in both windows and Linux and in Linux I had to change >> .gitconfig to recover this. >> I heard this is right place to discuss about this. Any suggestion or >> feedback if I’m doing it wrong ? >> >> Thanks in advance. >> >> -- >> You received this message because you are subscribed to the Google Groups >> "Git for human beings" group. >> To unsubscribe from this group and stop receiving emails from it, send an >> email to git-users+...@googlegroups.com. >> To view this discussion on the web visit >> https://groups.google.com/d/msgid/git-users/63807fa0-8f5b-4ed3-8f9e-09176c5db67en%40googlegroups.com >> >> <https://groups.google.com/d/msgid/git-users/63807fa0-8f5b-4ed3-8f9e-09176c5db67en%40googlegroups.com?utm_medium=email&utm_source=footer> >> . >> > -- You received this message because you are subscribed to the Google Groups "Git for human beings" group. To unsubscribe from this group and stop receiving emails from it, send an email to git-users+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/git-users/c0349da6-5133-4bdb-8624-9d6f2e4d543cn%40googlegroups.com.