f you want to set the editor only for Git, do either (you don’t need both):
- Set
core.editor
in your Git config:git config --global core.editor "vim"
- Set the
GIT_EDITOR
environment variable:export GIT_EDITOR=vim
f you want to set the editor only for Git, do either (you don’t need both):
core.editor
in your Git config: git config --global core.editor "vim"
GIT_EDITOR
environment variable: export GIT_EDITOR=vim