Basically, I entered:
git config --global use.name "My name"
Notice I wrote "use.name" instead of "user.name." But now that field is there, so I was wondering how to delete it.
Basically, I entered:
git config --global use.name "My name"
Notice I wrote "use.name" instead of "user.name." But now that field is there, so I was wondering how to delete it.
You can remove it by using the --unset
option of git config:
git config --global --unset use.name
See the documentation for more details.
git config --global --unset use.name
or you can edit config by --edit
git config --global --edit
Remove the section by
git config --global --remove-section use
and then
git config --global user.name "Your Name"
The config is stored in home directory.
Try editing ~/.gitconfig
You will see something like:
[use]
name = My name
You can change it to
[user]
name = My name
Or you can execute the same command with correction.
I had multiple git accounts on my machine and only thing that worked was
git config --local --unset credential.helper
git config --global --unset credential.helper
git config --system --unset credential.helper
git config --local --unset user.name
git config --global --unset user.name
git config --system --unset user.name
git config --local --unset user.email
git config --global --unset user.email
git config --system --unset user.email