Home > front end >  How do I commit with git when receiving error: Waiting for your editor to close the file...?
How do I commit with git when receiving error: Waiting for your editor to close the file...?

Time:03-09

I am new to git and I was able to use it successfully with my first repository but I just added another and now I am unable to commit to either repository. When I make the commit I receive this message: throg@throg-VirtualBox:~/repos/git_test$ git commit hint: Waiting for your editor to close the file... error: cannot run code--wait: No such file or directory error: unable to start editor 'code--wait' Please supply the message using either -am or -F option.

I thought it might be problems with Visual Studio Code but I receive the same message when using that.

CodePudding user response:

Run the command

git config --show-origin core.editor

It will print the config file path and the value of core.editor.

It seems you have set the wrong value code--wait. It should be code --wait. If it's the case, open the config file and edit the wrong value, save and quit.

  • Related