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

时间:2021-04-20 19:29:54

在mac中,如果使用 git commit –amend,会出现如下错误:

error: There was a problem with the editor ‘vi’.
Please supply the message using either -m or -F option.

原因是vi有问题,需要为 git 换一个默认的编辑器,比如 vim,如下进行配置即正常了。

git config --global core.editor "vim"