5
3

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

git commit時にerror: unable to start editor ''が出た時の対処法

Posted at

環境

macOS: 10.14.4

事象

git commit
git rebase -i HEAD~3
などを行った際に下記エラーが発生。

hint: Waiting for your editor to close the file... error: cannot run : No such file or directory
error: unable to start editor ''

解決方法

.gitconfigの設定を修正することで解決。

手順

# .gitconfigの内容を確認
$ less ~/.gitconfig

# 設定変更(他のリポジトリでも使いたいのでグローバルで良いかと)
$ git config --global core.editor vi

# .gitconfigが変更されていることを確認
$ less ~/.gitconfig 
5
3
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
5
3

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?