How to make git command line use a different default editor (vi haters)
I was asked this question and it turned out to be a very useful tip. For those of you who abhor the use of “vi” as the default *nix text editor when doing git commits merges pulls etc., rejoice! You can change git’s default text editor by changing the core.editor configuration. We can accomplish this from a command line like outlined below:
NOTE: put in your editor of choice at the end of the line, don’t be a fool :)
$ git config --global core.editor emacs
This works in most *nix based systems, including Mac OSX. If you just flat out have vi but don’t know what to use, “nano” is a pretty newb friendly text editor. or… you could just learn vi :)
cheers