I\'m trying just git commit and Git is giving this message:
hint: Waiting for your editor to close the file... /c/Users/AGT/AppData/Loc
Have you confirmed that code is accessible from the command line where you execute git commands?
You could run code --version
BTW. When I execute where code I get C:\Program Files\Microsoft VS Code\bin\code - it's no longer installed in the %App_Data% folder. Howerver, this should be irrelevant if you only specify code --wait without the path.
In other words, here is the procedure I would attempt:
code --version works in the console you use for gitgit config --global core.editor "code --wait"git commit. Does VS Code start and show COMMIT_EDITMSG file? Putting the name of the editor in double quotes produced this error for me. Put the name of the editor in single quotes, like:
git config --global core.editor 'vi'
Or, try switching to double quotes if you're already using single quotes.
It is expecting you to enter the comments regarding the commit you are making enter comment and it should commit the code.
I got that error while i configured with Atom.
I got it solved by opening the app in background before executing the command git commit
You can also try using $ git commit -m "Initial commit"
It directly passes the message without waiting for the editor to open
NOTE: You wont be able to add description just a comment
Change git commit to git commit -m "Title of your update".
For people having Atom as default editor for Git-related stuff
When Atom was a default code editor for it, there was some kind of conflict between Atom and Visual Studio Code. Opening a Terminal in Visual Studio Code and hitting git config --global core.editor "code --wait" solved the problem. Then Visual Studio Code opened a new tab each time I was doing something in the console without crashing.