The following command:
$git config --global --list
gives me:
user.name=test user
user.name=gotqn
I want to remove the first name. I referred to this article and have done the following commands but without any result:
git config --global --remove-section user.name='test user'
git config --global --remove-section user.name="test user"
git config --global --remove-section user.name=test user
git config --global --remove-section user.name
git config --global --remove-section test user
I am using Ubuntu 12.04 and
git version
gives me
git version 1.7.9.5
Please, help on this, because I want to try to save my project using git, but do not want to exec the command with 'test user' name.
You can edit the
~/.gitconfig
file in your home folder. This is where all--global
settings are saved.Super late answer, but hopefully still helpful:
Then you're free to:
Or you can just change the user name like this:
This command will open GNU nano editor with what you are expecting.
Last but not least usefull, although it's a marginal case is to use
In my case it cleared the data perfectly and with little to no effort
you can config for your every company project。And global's user name set your private github name and email.I thought this should be the best way for handle this condition.
You can edit your
.git/config
file present in the local repositoryrepo
manually as below:Now try in terminal:
git push -origin master
I was having trouble trying to clear out double entries for core.editor... I'd run
git config --unset-all core.editor
then
git config --list
and see no changes.
The answer was to run:
git config --global --unset-all core.editor