Git commit fails: “Please supply the message using either -m or -F option.”

為{幸葍}努か 提交于 2020-07-07 05:45:34

问题


When I type the git commit command to commit my file, I get this error message:

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.


回答1:


Check you git config core.editor value.
It might refer to a path with spaces in it, without quotes.

Make sure to use simple quotes when registering that editor path:
(And double quotes around the all command expression registered.
And '/' instead of '\' for the path separator)

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

That what was done when using, for instance, Visual Studio Code as a git editor.



来源:https://stackoverflow.com/questions/32547405/git-commit-fails-please-supply-the-message-using-either-m-or-f-option

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!