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

后端 未结 27 2476
庸人自扰
庸人自扰 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:17

    And if you are working with designers using the command line then Pico, and dont know short cuts ;)

    git config --global core.editor "pico"
    

    Or

    export VISUAL=pico
    export EDITOR=pico
    

提交回复
热议问题