2

I'm trying to commit some git changes but when I run:

git commit -a

it returns

gvim -f: gvim: command not found
error: There was a problem with the editor 'gvim -f'.
Please supply the message using either -m or -F option.

I am a noob and I have no idea what this means.

2 Answers 2

3

You have configured gvim as the default editor in git but you don't have it installed in your system. You've 3 choices:

1) install the gvim editor on your system

2) change the default editor of git with:

git config --global core.editor "path_of_your_favourite_text_editor"

3) keep on commiting without using a text-editor (not really a good solution)

git commit -a -m 'commit message'
Sign up to request clarification or add additional context in comments.

1 Comment

Hoorah! I actually did have Vim/Gvim installed so I tried your third option and that worked.
1

not sure about this but looking at the Git documentation for default editor, it falls back to vi when no editor is set. As the error suggested, you can pass a -m option so you dont have to use an editor.

git commit -a -m 'committing all files'

1 Comment

Thanks; That did the trick. I didn't realize that all of my previous commits included a -m message. When I added a filler message in the commit command, that fixed it. Hoorah!

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.