【问题标题】:Git commit fails: "Please supply the message using either -m or -F option."Git 提交失败:“请使用 -m 或 -F 选项提供消息。”
【发布时间】:2015-12-09 10:16:13
【问题描述】:

当我键入 git commit 命令提交文件时,我收到以下错误消息:

Microsoft Visual Studio:Microsoft:找不到命令

错误:核心编辑器“Microsoft Visual Studio”出现问题。

请使用 -m 或 -F 选项提供消息。

【问题讨论】:

标签: git git-commit


【解决方案1】:

检查你git config core.editor的价值。
它可能指的是包含空格的路径,不带引号。

确保在注册该编辑器路径时使用简单的引号:
(并在所有注册的命令表达式周围加上双引号。
并使用“/”而不是“\”作为路径分隔符)

git config core.editor "'C:/path/with spaces/xxx.exe' -<someoptions>"

using, for instance, Visual Studio Code as a git editor 时所做的事情。

【讨论】:

  • 突然开始出现问题,这个命令修复了它,即使我正在使用 /usr/bin/vim
猜你喜欢
  • 2019-07-12
  • 2017-01-18
  • 2011-09-07
  • 2019-05-17
  • 1970-01-01
  • 2011-06-02
  • 1970-01-01
  • 2021-03-06
  • 2019-10-25
相关资源
最近更新 更多