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?
- How do I allow 2 people to work on the same local copy of a git repository? Or can I?
- I change the capitalization of a directory and Git doesn't seem to pick up on it
- Replace Xcode's git with downloaded latest 1.8.3
- Homebrew install: Failed during: git fetch origin master:refs/remotes/origin/master -n --depth=1
- How to create a Team Project in TFS from a mac machine?
- launchctl git: command not found
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.