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

Question

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?

Answer

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.

How to merge a specific commit in Git

Git submodule head 'reference is not a tree' error