I updated the git core.editor to VS Code using this command.
git config --global core.editor "'C:\Program Files (x86)\Microsoft VS Code\code.exe'"
Now if it do a git.commit
the VS Code does open but git aborts the commit immediately like this:
PS C:\_git\gittestbed> git commit
Aborting commit due to empty commit message.
What else is needed for me git to wait until the data is entered and saved so that the commit accepts the commit message?
Update I tried two different syntax types but neither work.
PS C:\_git\gittestbed> git config --global core.editor "'C:\Program Files (x86)\Microsoft VS Code\code.exe -w'"
PS C:\_git\gittestbed> git commit
'C:\Program Files (x86)\Microsoft VS Code\code.exe -w': C:\Program Files (x86)\Microsoft VS Code\code.exe -w: No such fi
le or directory
error: There was a problem with the editor ''C:\Program Files (x86)\Microsoft VS Code\code.exe -w''.
Please supply the message using either -m or -F option.
PS C:\_git\gittestbed> git config --global core.editor "'C:\Program Files (x86)\Microsoft VS Code\code.exe' -w"
PS C:\_git\gittestbed> git commit
Aborting commit due to empty commit message.
enter code here
Update Using Notepad works. Seems as though VS Code returns too quickly for git or some other incompatibility.
git config --global core.editor notepad -w