[Git] How to resolve “Could not execute editor” error
by Riley MacDonald, November 23, 2017

I ran into this error when trying to rebase a git branch using git rebase -i [branch]. After making the desired alterations the error Could not execute editor was printed and the changes weren’t saved. Apparently git was using vi instead of my desired vim text editor.

Set git to use vim as the preferred editor:

git config --global core.editor "vim"

I was then able to rebase my branch and push.

Open the comment form

Leave a comment:

Comments will be reviewed before they are posted.

User Comments:

Be the first to leave a comment on this post!