Qiita Teams that are logged in
You are not logged in to any team

Log in to Qiita Team
Community
OrganizationAdvent CalendarQiitadon (β)
Service
Qiita JobsQiita ZineQiita Blog
4
Help us understand the problem. What is going on with this article?
@pumbaacave

gitでコミットする時There was a problem with the editor 'vi' エラー解決法

More than 3 years have passed since last update.

Mac環境でオプションなしgitコミットする時、以下のエラーが出る時があります。

error: There was a problem with the editor 'vi'.
Please supply the message using either -m or -F option.

どうやらvundleを使う時、vimrcをHPの勧めた通り設定したらエラーが出るらしいです(ソース

解決法

git config --global core.editor /usr/bin/vim

gitのデフォルトエディターであるviを呼び出す時、Macは代わりにvimを使います。ここでは直接デフォルトエディターをvimにしたらエラーを解消できました。
vimの居場所が/usr/bin/にない場合

git config --global core.editor $(which vim)

whichを使って取ってきます。
ちなみに

$ vim --version                                                                                                       
VIM - Vi IMproved 8.0 (2016 Sep 12, compiled Oct 17 2017 11:21:47)
MacOS X (unix) version
4
Help us understand the problem. What is going on with this article?
Why not register and get more from Qiita?
  1. We will deliver articles that match you
    By following users and tags, you can catch up information on technical fields that you are interested in as a whole
  2. you can read useful information later efficiently
    By "stocking" the articles you like, you can search right away

Comments

No comments
Sign up for free and join this conversation.
Sign Up
If you already have a Qiita account Login
4
Help us understand the problem. What is going on with this article?