I am trying to set git on my Mac Os Snow Leopard 10.6.7 but I made some errors on doing that…
At this time I have the following warning:
$ git config --global core.editor
EDITOR=/usr/bin/vim
error: More than one value for the key core.editor: mate
$ git config --global core.editor open
warning: core.editor has multiple values
How can I solve that? And, mostly, how can I set the core.editor to TextEdit and make it works?
P.S.: I already read this question.
The easiest way is to change the environment variable EDITOR to point to mate. In your
.bash_profileadd the following:and re-start your terminal session, or source the
.bash_profile.As for your error message:
it means you’ve added multiple core.editor lines in your .gitconfig.
Use mate
~/.gitconfigto modify your.gitconfigand remove the extra lines, or if you don’t mind unsetting all of them use:Then use
then you can leave
$EDITORset to what it was previously set to.If
mateis not located in/usr/local/binfind where it is first by usingtype mate(in bash, not sure about other shells)Since you want to use
openas your$GIT_EDITORyou will need the following:This will work for that: