From: Junio C Hamano
The command specified by either the VISUAL or EDITOR environment -variables is used to edit the commit log message.
+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).