Git-commit cannot open vim

I recently installed bash-itin my terminal. Now when I try to execute git commit, the terminal shows me this error:

/usr/bin/mate -w: /usr/bin/mate: No such file or directory error: cannot run /usr/bin/mate -w: No such file or directory error: There was a problem with the editor '/usr/bin/mate -w'. Please supply the message using either -m or -F option.

Prior to bash-itthe commit command, vim opened correctly. Of course, I tried changing core.editorin git to "vim", but it still doesn't work.

Could you help me solve this problem? I really like vim, it was very easy and fast ... I do not want to use TextMate to edit the commit message.

PS: I am using Mac OSX

+4
source share
4 answers

, , /usr/bin/mate .bash_profile , vim

0

. vi vim. vim.

git config --global core.editor vim
+14

If other answers do not work, try export GIT_EDITOR=vim

+1
source

As abalos replied

git config --global core.editor vim

If you do not want to use or you do not have it installed , you can also use the editor vim vim nano

git config --global core.editor nano
0
source

All Articles