How to unset git config? #23397
-
After encountering authentication issues with pushing from Github Desktop, I followed some advice here, and ended up making some changes to my git config that I now cannot figure out how to undo.
Could anyone help with this? |
Beta Was this translation helpful? Give feedback.
Replies: 6 comments
-
iriseel:
What do you mean by “can’t”? Deleting the relevant parts of the git config should work to get rid of settings. Alternatively you could look at |
Beta Was this translation helpful? Give feedback.
-
Hi airtower-luna, thanks for your reply! By “can’t” I mean that when I hit delete on any of the letters, it just moves my typing position back like a left-arrow, without erasing any actual characters. I can replace characters by typing letters, but not delete them. However, I took another look at your unset rec and figured out how to undo my git config mistakes!
So yeah, still not sure why I couldn’t delete characters in “git config --global --edit” directly, but at least I managed to unset them outside. Thanks again! |
Beta Was this translation helpful? Give feedback.
-
iriseel:
Is the editor that was started with the |
Beta Was this translation helpful? Give feedback.
-
Nah, it’s just Terminal, weirdly. Deleting has worked everywhere else in Terminal except for in that “git config --global --edit” window 😕 |
Beta Was this translation helpful? Give feedback.
-
Vi would usually run in the terminal (though GUI versions exist). It’s a very common default editor on Unix-ish systems, and if you’re using Windows I wouldn’t be surprised at all if Git Bash used it, too. |
Beta Was this translation helpful? Give feedback.
-
Ohh that would make sense then! I’m using mac but I just looked it up online and Vi seems to come preinstalled on most macOS. |
Beta Was this translation helpful? Give feedback.
What do you mean by “can’t”? Deleting the relevant parts of the git config should work to get rid of settings. Alternatively you could look at
git config --unset
.