$ git commit error: cannot run vim: No such file or directory error: There was a problem with the editor 'vim'. Please supply the message using either -m or -F option.
How can I overcome the error and define the editor?
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. It only takes a minute to sign up.Sign up to join this community
vim or specifying the commit message on the command-line like the error message suggested, there are several ways to tell git which editor it should use. You can set the
core.editor property (locally for that project, or globally for all of git):
$ git config --global core.editor nano
You can also set the
EDITOR environment variable, which git will fall back on if
core.editor isn't set:
$ export EDITOR=nano
The answer was:
sudo apt-get install vim
as it was a new machine and vim wasn't installed.