warder57
warder57

Reputation: 350

git rebase could not execute editor

I'm attempting to squash some git commits using rebase. When I run this:

git rebase -i HEAD

I get this error:

/usr/lib/git-core/git-rebase: 1: eval: /usr/bin/mate: not found
Could not execute editor

I've attempted to change the git config editor variable but I haven't gotten it to work. Right now my config file shows the following:

[core]
    editor = /usr/bin/vim

I'm running Ubuntu 13.04

Any ideas?

Upvotes: 9

Views: 8478

Answers (3)

eli
eli

Reputation: 71

As additional measure you can look at the sequence.editor config option:

[sequence]
    editor = /usr/bin/vim

or override it's behavior with GIT_SEQUENCE_EDITOR=/usr/bin/vim env variable.

More details you can find on: git-config.txt-sequenceeditor

Upvotes: 0

j-maks
j-maks

Reputation: 186

Do something like that

$ git config --global core.editor emacs

where emacs paste name of your editor

Upvotes: 17

John Szakmeister
John Szakmeister

Reputation: 47122

Check to make sure GIT_EDITOR is not set in your environment. It takes precedence over core.editor.

Upvotes: 4

Related Questions