Skip to content

Instantly share code, notes, and snippets.

@vanpeerdevelopment
Created January 28, 2014 18:52
Show Gist options
  • Save vanpeerdevelopment/8673769 to your computer and use it in GitHub Desktop.
Save vanpeerdevelopment/8673769 to your computer and use it in GitHub Desktop.
Command to remove a git configuration.
# Remove repository configuration
git config --unset [key]
# Remove global configuration
git config --global --unset [key]
# Remove system configuration
git config --system --unset [key]
@mkasimd
Copy link

mkasimd commented Oct 25, 2019

As a little sidenote, in case you have multiple entries with the same key and want to remove them all, you should use unset-all instead of unset.

@KulaGGin
Copy link

KulaGGin commented Jun 24, 2020

@Franks-Joseph, to see the keys, run git config --global --list or --local - for local settings respectively. It will be entries such as core.autocrlf, merge.tool=bc and other, depending on what you set.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment