1

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?

KingCrunch
  • 124,572
  • 19
  • 146
  • 171
Kevin_TA
  • 4,437
  • 12
  • 45
  • 76

1 Answers1

2

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.

Koraktor
  • 38,541
  • 9
  • 69
  • 98
Anton Kovalenko
  • 20,203
  • 2
  • 35
  • 68