How do I make Git use the editor of my choice for commits?

后端 未结 27 2093
庸人自扰
庸人自扰 2020-11-22 01:33

I would prefer to write my commit messages in Vim, but it is opening them in Emacs.

How do I configure Git to always use Vim? Note that I want to do this globally,

27条回答
  •  感情败类
    2020-11-22 02:00

    To make vim the default editor for git on ubuntu 20:04 run the following command:

    git config --global core.editor vim
    

提交回复
热议问题