git - 当我输入“git commit”时如何打开Atom
问题描述
当我键入git commit
Atom 时应该打开,但它没有。
对于命令提示符上的配置,我键入:
config --global core.editor "atom --wait"
当我输入:
git commit
它说:
hint: waiting for your editor to close the file .......
error: there was a problem with the editor "atom --wait"
Please supply the message using either -m or -F option.
解决方案
正如“ Git 提交失败:“请使用 -m 或 -F 选项提供消息。”中解释的那样,您应该检查您的git config core.editor
值。它可能指的是带有空格的路径,不带引号。
确保在注册该编辑器路径时使用单引号,并在所有注册的命令表达式周围使用双引号,
'/'
而不是'\'
路径分隔符。
git config core.editor "'C:/path/with spaces/xxx.exe' -<someoptions>"
推荐阅读
- python-3.x - CNN 验证准确率高,但预测不好?
- c++ - 在 C++ 中查找范围的长度
- javascript - 在 for 循环中使用 axios 请求
- javascript - vrmlloader.js 和 vrmloader.js 有什么区别?
- c#-7.0 - 在 C# 中调用函数时出错,因为参数中使用了变量
- r - 如何在 R 中使用 ggplot2 制作类似的图?
- python - 在python中关闭mp4视频
- java - Java Regex - 允许名称的所有常规 Unicode 字符,但不允许模糊变体
- c++ - 在 C++ 中快速读取和写入文件
- r - 如何在与 R Shiny 应用程序相同的窗口中打开 PDF 文件?