Gitでコミットが失敗した。原因はエディタの設定だった。
Git にて、git commit コマンドを実行し Vim 上でコメント書いて、コミットするとエラーが発生し、コミットが失敗しました。
$ git commit error: There was a problem with the editor 'vi'. Please supply the message using either -m or -F option.
Git に使用するエディタを設定すればよいようです。
whichコマンドでパスを調べます。
$ which vim /usr/bin/vim
Git のエディターを Vim に設定します。
$ git config --global core.editor "/usr/bin/vim"
以上で完了です。
.gitconfigには以下のように追加されます。
[core] editor = /usr/bin/vim