MPD~モチドレ

IT技術系のメモやらコピペやら。

git commitでエディタ編集後エラーとなる場合

Mac OS X v10.6 Snow Leopardにgitをインストールして
git commitした時にコミットされなかったのでメモ。

明示的に使用するエディタをgitに設定してやればいい。
export GIT_EDITOR="/hoge/hoge"でも良いらしい。

$ git commit
error: There was a problem with the editor 'vi'.
Please supply the message using either -m or -F option.
$ git config --global core.editor "/usr/bin/vim"
$ git commit