setting the default editor for git commit messages Apr
07
1
0

Here's how you can set the default editor when commenting on git commits.

From man git-commit:

Environment And Configuration Variables

The editor used to edit the commit log message will be chosen from the GIT_EDITOR environment variable,
the core.editor configuration variable,
the VISUAL environment variable,
or the EDITOR environment variable (in that order).

examples:

git config --global core.editor "vim"
export VISUAL=vim
export EDITOR=vim

The EDITOR has the advantage that a number of other programs use this setting.

Bookmark and Share
blog comments powered by Disqus