今天提交代码git  commit -a的时候出现了这个错误

git commit 报错  There was a problem with the editor 'vi'

上网查了一下,说是Vim的返回值出错了,出错的原因还在翻译英文,

先贴出解决方案吧

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

执行这个倒是可以实现了,但是再提交的时候又出现了这个问题

git commit 报错  There was a problem with the editor 'vi'

请教大神之后,解释是这样的:

git 内部有两个编辑器,nano和Vim,一般默认的都是nano

第一次我们执行的那个操作是去给git更换编辑器,然后第二次报错却是因为git没有找到这个vim的编辑器(这个为什么没有找到我没有找到原因)

附代码:

Vim

vim ~/.gitconfig

 

相关文章:

  • 2022-12-23
  • 2021-09-19
  • 2022-12-23
  • 2022-12-23
  • 2021-11-15
  • 2021-05-19
  • 2021-11-12
  • 2022-01-07
猜你喜欢
  • 2021-12-31
  • 2021-06-20
  • 2022-12-23
  • 2022-12-23
  • 2021-05-18
相关资源
相似解决方案