Editor does not open when prompted to enter commit message
Apparently Git is suppose to open an editor for you when it wants you to enter a commit message. This never happens on my machine so I am wondering if it is just not set up or I don’t have Vim or something. TextEdit is my default text editing (.txt) application.
How can I have Git open a text editor for me to use?
One Solution collect form web for “Editor does not open when prompted to enter commit message”
man git-var for explanation on how
git finds an editor to start:
The order of preference is the $GIT_EDITOR environment variable, then
core.editor configuration, then $VISUAL, then $EDITOR, and then the
default chosen at compile time, which is usually vi
I’d start with
export GIT_EDITOR=/path/to/your/editor or
git config --add core.editor /path/to/your/editor, to provide an editor which you know to be installed.