How do I delete the GIT_EDITOR
variable?
I set it by error and would like to remove it.
It looks like git var
can only list variables...
How do I delete the GIT_EDITOR
variable?
I set it by error and would like to remove it.
It looks like git var
can only list variables...
Environment variables are set/exported, and hence unset/unexported, by the outer level shell that runs each command. Hence the way to un-set GIT_EDITOR
completely depends on your shell.
In most Unix-style shells, unset
is the verb to un-set a variable. If the variable is marked exported, this not only unsets it in the shell but also removes it from the exported environment. Unix csh / tcsh uses unsetenv
instead (its unset
unsets only shell variables, not environment variables; set
sets shell variables and setenv
sets environment variables).
I have no idea what do to in DOS-style shells, but Command line to remove an environment variable from the OS level configuration has some advice, plus links to additional StackOverflow questions and answers.