Created
January 28, 2014 18:52
-
-
Save vanpeerdevelopment/8673769 to your computer and use it in GitHub Desktop.
Command to remove a git configuration.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Remove repository configuration | |
git config --unset [key] | |
# Remove global configuration | |
git config --global --unset [key] | |
# Remove system configuration | |
git config --system --unset [key] |
@Franks-Joseph [key] here refers to the property you are trying to unset (or remove). For example, if you want to unset/remove the 'username' property, then the [key] will be 'user.name'. So that the command becomes: git config --global --unset user.name
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
.
@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
What the heck does [key] mean?