git - 进行 git 提交时出现 Vi 错误

标签 git vim git-commit

我正在尝试进行 git 提交。我运行命令 git commit 并打开 vim。我输入我的提交消息,当我执行 :wq 命令时,我收到以下错误:

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

知道如何找出问题所在吗?

最佳答案

要解决此问题,请更改您的 git 编辑器路径

git config --global core.editor /usr/bin/vim 

SOURCE

关于git - 进行 git 提交时出现 Vi 错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/36144731/

相关文章:

git: 执行 git 失败

xcode - 在 mac 上开始使用 Git + GitX 和 Xcode 项目的快速指南?

git - github 私有(private)仓库中的 Terraform 模块

Git 在 checkout 后 Hook 中检测到我们正在创建一个新分支

c - youcompleteme 无法正确完成 sigaction 结构

vim - 如何在 Vim 中使所有制表符缩进对齐

git - 从 Git 历史记录中删除敏感文件及其提交

git - 从 GitHub 克隆特定分支 - fatal error

vim - vim口音: Cannot write "â"

git - Bitbucket 需要更改最后一次提交的作者姓名