Obe*_*yda 6 git commit-message visual-studio-code windows-subsystem-for-linux
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
Run Code Online (Sandbox Code Playgroud)
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
Run Code Online (Sandbox Code Playgroud)
我的~/.gitconfig
:
[core]
editor = code --wait
Run Code Online (Sandbox Code Playgroud)
当我运行时git commit
,vscode 以 开头C:\mnt\$PathToRepo$\.git\COMMIT_EDITMSG
,但该文件是空的(应该有要提交的更改+差异)。
当我编写提交消息、保存并退出时,我会在终端中看到以下内容:
Aborting commit due to empty commit message.
Run Code Online (Sandbox Code Playgroud)
笔记:
当我这样做时:
跑步git commit
;
在 vscode 中写入提交消息(例如:初始化 repo),保存并关闭;
之后Aborting commit due to empty commit message.
,我git commit
再次跑步;
VSCode 将打开并显示我在步骤 2 中编写的相同提交消息(即:Initialize repo)
如果重点是在 vscode 上使用 WSL git,这里是官方解决方案: https: //code.visualstudio.com/docs/remote/wsl。
本质上,您只需要安装远程开发扩展包。
归档时间: |
|
查看次数: |
7166 次 |
最近记录: |