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 to use different keys for different Bitbucket repos in SmartGit?
  • ssh not working, muxserver_listen bind(): No such file or directory
  • gitignore negations ignored by git for osx xcode project
  • Git Autocompletion looks weird (and only half-functional)
  • Generated public rsa key on mac for use with git, but can't locate it?
  • 3-way merge tools for Mac that show 4 panes
  • What equivalents are there to TortoiseSVN, on Mac OSX?
  • Git post-receive over HTTP in OS X
  • One Solution collect form web for “Editor does not open when prompted to enter commit message”

    See 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.

    Git Baby is a git and github fan, let's start git clone.