Reputation: 6871
I am attempting to make a git commit. I run the command git commit
and vim opens up. I type in my commit message, and when I execute the :wq
command, I get the following error:
error: There was a problem with the editor 'vi'. Please supply the message using either -m or -F option.
Any idea how I can figure out what the problem is?
Upvotes: 4
Views: 1257
Reputation: 32167
If you want to recover the commit message, you can look in .git/COMMIT_EDITMSG
.
This file contains the commit message of a commit in progress. If
git commit
exits due to an error before creating a commit, any commit message that has been provided by the user (e.g., in an editor session) will be available in this file, but will be overwritten by the next invocation ofgit commit
.
Upvotes: 1