LoginSignup
1
1

More than 5 years have passed since last update.

fishシェル使用時にgitにコミットできない場合

Posted at

fishシェルを入れた環境で、下記のようなエラーが出てGitにコミットできない場合があります。

Vim does not support "/usr/local/bin/fish". You must use Vim 7.4.276 or later.
Press ENTER or type command to continue
error: There was a problem with the editor 'vi'.
Please supply the message using either -m or -F option.

原因

Vimの7.4.276以前のバージョンはfishシェルに対応していませんでした。
これは対応するパッチにより解消したのですが、OS X標準のviは対応するバージョンではありません。

対処法

  1. Homebrew等でバージョン7.4.276以降のvimを入れる
  2. コミットログ編集用のエディタを明示的にvimにする(標準では「vi」ですがこちらはHomebrewでvimの新しいバージョンを入れてもOS X標準のままです)
git config --global core.editor 'vim -c "set fenc=utf-8"'

参考文献

1
1
1

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
1