Answer the question
In order to leave comments, you need to log in
Why can't I change the user in git?
[email protected] MINGW64 ~ (master)
$ git config --global --list
user.name=Ivan Serov
[email protected]
user.name=Ivan
user.name=Ivan
user.name=Ivan
difftool.sourcetree .cmd='' "$LOCAL" "$REMOTE"
mergetool.sourcetree.cmd=''
mergetool.sourcetree.trustexitcode=true
core.autocrlf=true
core.safecrlf=warn
core.quotepath=off
color.ui=auto
[email protected] SerVantes MINGW64 ~ (master)
$ git config --global user.name "Ivan Sierov"
warning: user.name has multiple values
error: cannot overwrite multiple values with a single value
Use a regexp, --add or --replace-all to change username.
What does it ask to change into values, why can't I change the username?
Answer the question
In order to leave comments, you need to log in
The output of the last command tells you what to do. You somehow ended up with multiple usernames in the global git config, which can be fixed with:
$ git config --global --replace-all user.name "Ivan Sierov"
$ git config --global --add user.name "Ivan Sierov"
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question