Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to delete a git configuration?

Tags:

git

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.

like image 835
bin1six Avatar asked Feb 04 '16 05:02

bin1six


People also ask

How do I change my git config?

The global git config is simply a text file, so it can be edited with whatever text editor you choose. Open, edit global git config, save and close, and the changes will take effect the next time you issue a git command. It's that easy.

How do I remove a local git account?

Go to Windows Credential Manager , open the Windows Credentials tab, locate git:https://github.com , open the entry, and click Remove . This will remove your GitHub credentials from the credential manager.

Where is git config stored?

The system level configuration file lives in a gitconfig file off the system root path. $(prefix)/etc/gitconfig on unix systems. On windows this file can be found at C:\Documents and Settings\All Users\Application Data\Git\config on Windows XP, and in C:\ProgramData\Git\config on Windows Vista and newer.


2 Answers

You can remove it by using the --unset option of git config:

git config --global --unset use.name

See the documentation for more details.

like image 124
1615903 Avatar answered Sep 22 '22 06:09

1615903


git config --global --unset use.name

or you can edit config by --edit

git config --global --edit
like image 22
因幡めぐる Avatar answered Sep 24 '22 06:09

因幡めぐる