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?
To fix this problem change your git editor path
git config --global core.editor /usr/bin/vim
SOURCE
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
.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With