When I type the git commit command to commit my file, I get this error message:
当我键入git提交命令来提交我的文件时,我得到了这个错误消息:
Microsoft Visual Studio: Microsoft: command not found
微软Visual Studio: Microsoft:命令未找到。
error: there was a problem with the core editor 'Microsoft Visual Studio'.
错误:核心编辑“微软Visual Studio”有一个问题。
Please supply the message using either -m or -F option.
请使用-m或-F选项提供消息。
1 个解决方案
#1
1
Check you git config core.editor
value.
It might refer to a path with spaces in it, without quotes.
检查git配置内核。编辑值。它可以引用一个包含空格的路径,没有引号。
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.
例如,在使用Visual Studio代码作为git编辑器时所做的工作。
#1
1
Check you git config core.editor
value.
It might refer to a path with spaces in it, without quotes.
检查git配置内核。编辑值。它可以引用一个包含空格的路径,没有引号。
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.
例如,在使用Visual Studio代码作为git编辑器时所做的工作。