Git commit的时候出现如下错`
C:/Program Files (x86)/Git/bin/vim: -c: line 0: syntax error near unexpected token `(‘ C:/Program Files (x86)/Git/bin/vim: -c: line 0: `C:/Program Files (x86)/Git/bin/vim \[email protected]\‘ error: There was a problem with the editor ‘C:/Program Files (x86)/Git/bin/vim‘. Please supply the message using either -m or -F option.
这是因为 git commit 后会默认找 C:/Program Files (x86)/Git/bin/vim
用这个来作为message的编辑器,但是没找打到或别的原因
处理
1: 可以使用 git commit -m "message"
直接设置提交message
2: 或在项目目录下git config core.editor vim
来设置git message 代开的编辑器
时间: 2024-10-09 01:57:00