【发布时间】:2019-02-11 05:36:21
【问题描述】:
我正在尝试git commit,Git 正在发送此消息:
提示:正在等待您的编辑器关闭文件... /c/Users/AGT/AppData/Local/Programs/Microsoft VS Code/bin/code: 行 28: /Code.exe: No such file or directory error: 有问题 使用编辑器“代码--wait”。请使用任一方式提供消息 -m 或 -F 选项。
我正在使用或尝试使用 VS Code 作为默认设置,并且在打开或关闭它时我收到了相同的消息。通过 VS Code 或命令 git commit -m "Initial commit" 完成的提交工作正常。
我尝试更改配置路径:
git config --global core.editor "code --wait"-
git config --global core.editor "'C:\Users\AGT\AppData\Local\Programs\Microsoft VS Code\Code.exe' -n -w"和随后的变体(这些变体在错误消息“寻找匹配时出现意外的 EOF”): - C:\Users\AGT\AppData\Local\Programs\Microsoft VS Code\bin
- C:\Users\AGT\AppData\Local\Programs\Microsoft VS Code\bin\code
- C:\Users\AGT\AppData\Local\Programs\Microsoft VS Code\Code.exe
根本没有成功。
git状态是:
On branch master
No commits yet
Changes to be committed:
(use "git rm --cached <file>..." to unstage)
new file: css/app.css
new file: index.html
new file: js/app.js
如何通过 Git BASH 将其修复为 git commit 命令与 Vs Code 一起正常工作?这似乎是路径问题。
更新信息:我用 Sublime 3 测试了git commit,它运行良好。
【问题讨论】:
-
进展如何?您是否尝试过以下答案中的步骤?
-
我在使用 neovim 作为默认编辑器时收到了类似的消息。
-
事实上,我遇到了一个更普遍的问题:neovim 进程在保存文件时会在退出时挂起。这个问题似乎是由gutentags 插件引起的。因此,如果您到达这里是因为在编辑提交消息后退出 neovim 时收到
Waiting for your editor to close the file…消息,您可以尝试删除gutentags。
标签: git visual-studio-code git-commit