LoginSignup
1
0

More than 5 years have passed since last update.

Gitで「error: There was a problem with the editor 'vi'.」が発生した際の対処法

Last updated at Posted at 2018-07-08

Mac環境でgitコミットする際、以下のエラーが発生する場合があります。

error: There was a problem with the editor 'vi'.

対処法

git config --global core.editor 'vim -c "set fenc=utf-8"'

gitコミット時に利用するエディタをvimに設定することでエラーが発生しなくなります。
※日本語ログが文字化けせずに読めるようエンコードはutf-8指定しておきます。

[参考]現在設定されているエディタを確認する。

less ~/.gitconfig

[参考]設定値

[core]
   editor = vim -c \"set fenc=utf-8\"
1
0
0

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
0