최근 vim 환경을 https://github.com/amix/vimrc 환경으로 바꿨더니,
git commit 시에, 아래와 같은 오류가 발생했다.
error: There was a problem with the editor ‘vi’.
Please supply the message using either -m or -F option.
-m 옵션으로는 당연히 잘 되지만, git commit 이나 -v 옵션등을 주어서, vi 에서 commit message를 작성할 때에는, 저장하고 빠져 나오면 위와 같은 오류가 발생하는 것.
해결책은 의외로 간단하다.
git config 설정에서 core.editor 를 현재 vim 경로로 설정해 주면 끝.
$ git config –global core.editor $(which vim)
출처는 아래.
https://github.com/gmarik/Vundle.vim/issues/167#issuecomment-66900619