I am going through a tutorial on git and my next task is to use a "git commit" command and use an editor to make my commit message. I can get the editor to come up but I always get the "Aborting commit due to empty message error." I looked at How do I make Git use the editor of my choice for commits? and Aborting commit due to empty commit message among other places and none of the options work. The --wait isn't legal and the -multiInst and -notabbar arguments didn't help. Also when I put the code in my C:\Users\Kendall.gitconfig git still uses the value I put in the core editor from the command line. I tried to use the -F flag in my .gitconfig file but it had no effect because it still used the value from the command line. Any help would be appreciated.
You are not saving the file in the editor therefore when git tries to read the temp file it sees no commit message.
The easiest thing for beginners is to use the -m flag and pass your message as a string in quotes.
git commit -m "commit message here"
I found the answer to my problem. Notepad++ comes up with a blank new file but if I open ~/.git/COMMIT_EDITMSG and type in my message it works fine. I have to do the same thing if I do a revert. Thanks for the help!
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