galaxy-sixth-sensey - gitの「Could not execute editor」が出たときは$GIT_EDITORを設定する
2018/07/31
gitの「Could not execute editor」が出たときは$GIT_EDITORを設定する

$ GIT_EDITOR=nvim git rebase --interact

起承結

$ git rebase --interact
/usr/local/Cellar/git/2.16.1/libexec/git-core/git-rebase--interactive: line 267: /Users/aiya000/poi/.git/rebase-merge/git-rebase-todo: Permission denied
Could not execute editor

って言われてrebase -iできない。 なんかちょっと前もこれで困ってrm -rf git-repo && git clone https://foo.bar/git-repo.gitとかした気がする。

皆さんけっこうgit config core.editor /path/to/your_editorのようにyour_editorへのフルパス指定で解決してるみたいでしたが、 僕は解決できず。

$ GIT_EDITOR=nvim git rebase --interact

で解決できました。

最後にecho 'export GIT_EDITOR=nvim' >> .zprofileみたいな感じで完全になりました。 最強。


この記事はこちらから修正リクエストを送ることができます。
gitの「Could not execute editor」が出たときは$GIT_EDITORを設定する - github
ゴミ箱ボタンの左にある、鉛筆ボタンを押してね!