Quote from: http://www.kernel.org/pub/software/scm/git/docs/git-commit.html
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). See git-var(1) for details.
More info on this stack overflow: http://stackoverflow.com/questions/647032/unable-to-change-the-default-editor-in-terminal