1

Whenever I use git commit --amend, it automatically opens Vim on Terminal. Since I am a Sublime Text 2 user, I would love to have this editor opening whenever I execute this command.

Thanks for your help

Peter Rincker
  • 43,539
  • 9
  • 74
  • 101
Omar Lahlou
  • 1,000
  • 9
  • 33

1 Answers1

6

Set Sublime Text 2 to be your editor for commits

git config --global core.editor "subl -n -w"

But I do not use Sublime, so check this : https://help.github.com/articles/associating-text-editors-with-git/

Mauddev
  • 361
  • 2
  • 14
  • 1
    As the link mentions you have to make sure to set up the `subl` command. You can do so by following [these instructions](http://www.sublimetext.com/docs/3/osx_command_line.html) – 2016rshah Jun 26 '15 at 20:08
  • for OSX and Sublime 3, it worked after doing this: https://gist.github.com/martinbuberl/5823ed247d279d1a2d06 – chelder Mar 23 '18 at 09:41