Search code examples
git

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


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?


Solution

  • 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.