Git 提交失败 : "Please supply the message using either -m or -F option."

标签 git git-commit

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

Microsoft Visual Studio: Microsoft: command not found

error: there was a problem with the core editor 'Microsoft Visual Studio'.

Please supply the message using either -m or -F option.

最佳答案

查你 git config core.editor值(value)。
它可能指的是一个带有空格的路径,没有引号。

注册该编辑器路径时,请确保使用简单的引号:
(以及所有注册的命令表达式周围的双引号。
和 ' / ' 而不是 ' \ ' 为路径分隔符)

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

那是什么时候做的using, for instance, Visual Studio Code as a git editor .

关于Git 提交失败 : "Please supply the message using either -m or -F option.",我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/32547405/

相关文章:

git - 我如何 git pull -f

git - 我丢失了自述文件,因为我在本地执行了 'git push --force' 但我不知道如何取回它。自述文件是在远程创建的

git - 多个 Git 修复提交

github - 如何在不删除代码更改的情况下删除特定的旧提交(即基本上更改 git 故事)

android - jenkins 如何根据 git commit 消息中的关键字执行特定命令?

python - 如何捕获从 python 子进程运行的 git clone 命令的输出

git - merge 冲突后修复 git "not currently on any branch"

GIT 并行克隆所有存储库,即克隆所有存储库的总时间接近于最大存储库 : fatal: index-pack failed 所需的时间

git:自动 merge 与正常(不冲突) merge ?

git 提交 : cannot read lockfile