Rob Wilkerson Rob Wilkerson - 1 month ago 20
Git Question

Could not execute editor

I don't often have to modify multiple commit messages, but it has happened once or twice and I don't ever remember seeing this. I hope someone else has. When I

git rebase -i HEAD~7
, the expected list opens in vi exactly as expected. I change the
pick
values to
edit
where appropriate and then
:wq
.

Result:
Could not execute editor


The
core.editor
setting in my global
.gitconfig
is
vi
(I've also changed it to
vim
in a wildly desperate move). I tried using
mate
, but that didn't even open the initial list properly so I changed it back.

I'm using v1.7.3 and would welcome any suggestions.

Answer

Yesterday was just one of those days. On a lark, I decided to set the full path to vi (e.g. /usr/bin/vi) rather than just the executable. Now everything works. I have to admit that I don't get it since vi is perfectly executable on its own (my $EDITOR env variable is also set to vi), but it's working and my technical karma hasn't been so great lately so maybe I just shouldn't question the deities will...