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?

  • Visual studio 2012 git ssh
  • How to push to new git branch not with Xcode
  • What do git manual sections mean?
  • Maintaining a git branch starting from a certain commit.
  • Building multiple github repositories at once
  • How do I import an existing GIT project into SVN, preserving GIT history on master branch?
  • Adding git repository to docker image (workflow best practices)
  • How to run 'git diff --check' on certain file types only
  • Git http.proxy Setting
  • Git deattached HEAD using synchronizing from GitHub client
  • Add remote via JGit
  • Using Github GUI for Mac and git from the terminal
  • 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.