OS Name: Microsoft Windows 10 Pro
OS Version: 10.0.17134 N/A Build 17134
...
System Type: x64-based PC
Processor(s): 1 Processor(s) Installed.
[01]: Intel64 Family 6 Model 158 Stepping 10 GenuineIntel ~3696 Mhz
BIOS Version: American Megatrends Inc. 2.20, 10/27/2017
OS: Debian
Kernel: x86_64 Linux 4.4.0-17134-Microsoft
Shell: zsh 5.3.1
CPU: Intel Core i7-8700K CPU @ 3.696GHz
RAM: 8041MiB / 16344MiB
I have this in my ~/.gitconfig
:
[core]
editor = code --wait
When I run git commit
, vscode starts with C:\mnt\$PathToRepo$\.git\COMMIT_EDITMSG
, but this file is empty (it's supposed to have changes to be commited + a diff).
And when I write a commit message, save and exit, I get this in the terminal:
Aborting commit due to empty commit message.
Note:
when i do this:
run git commit
;
write commit message in vscode (ex: Initialize repo), save and close;
after the Aborting commit due to empty commit message.
, i run git commit
again;
VSCode will open with the same commit message i wrote in step 2 (ie: Initialize repo)
If the whole point is to to use WSL git on vscode, here is the official solution: https://code.visualstudio.com/docs/remote/wsl.
Essentially, you just need to install the Remote Development Extension Pack.