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
It looks like it has to do with the path of VS Code in your case and possibly the command to set the editor git config --global core.editor "code --wait" not being correct.
In my case, I couldn't complete a merging command.
What really worked for me after ensuring that VS Code is correctly setup :
code --version
worked fine. Executing where code showed me that the installation of code was in a different location than the local app data, which was where git was looking in. I could also tell code could not really be found because the editor was not launching when I was merging.
Finally executing
git config --global core.editor 'code --wait'
did the trick for me. Not that it's in single quotes as suggested further up in one of the comments.