Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How can I remove an entry in global configuration with git config?

Tags:

git

I ran a global configuration command in git to exclude certain files using a .gitignore_global file:

git config --global core.excludesfile ~/.gitignore_global 

Is there a way to undo the creation of this setting globally?

like image 963
hatmatrix Avatar asked Aug 08 '12 15:08

hatmatrix


People also ask

What does the git config --'global command do?

The git config command is a convenience function that is used to set Git configuration values on a global or local project level. These configuration levels correspond to . gitconfig text files. Executing git config will modify a configuration text file.

How do I edit Global files in git?

How to do a git config global edit? 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.


Video Answer


1 Answers

I'm not sure what you mean by "undo" the change. You can remove the core.excludesfile setting like this:

git config --global --unset core.excludesfile 

And of course you can simply edit the config file:

git config --global --edit 

...and then remove the setting by hand.

like image 197
larsks Avatar answered Sep 20 '22 15:09

larsks