Windows 10 cmd opens up this editor by default when I try to edit a GIT commit message. Can you please tell me what that is and how I can use it? Thanks.
-
It should also be possible to configure Git to use a different editor. – Keith Thompson Dec 28 '16 at 05:59
-
I think git is a very powerful scm. so I guess the default editor taken by Git should be very powerful as well. – Kent Dec 28 '16 at 09:48
3 Answers
It is Vim, the default editor in Git installation. It is rather hard to use if you don't know how to use it! It is not trivial as other editors like Notepad++, Emacs or Sublime Text, though it is very powerful, and when you mastered it (it takes a few month of hard work! :) ), you'l become highly productive.
However you can easily configure git to use another editor. Fire up a command line and enter:
git config --global core.editor notepad
Now Windows Notepad is your default editor in git. You can easily change it to any editor of your choice. See here or here or here.
By the way, I recommend you to put the time and learn Vim! You'll not regret it :)

- 17,853
- 3
- 55
- 72
-
2As someone who just doesn't like Vim but wants to Keep that light-weight console workflow: ```git config --global core.editor nano```. Way easier to learn, works on all Unix systems (including macOS) and I just tested it on Windows with git. Works like a charm! – ecth Mar 13 '18 at 10:32
-
1From version 2.15.1, Git for Windows comes with "nano", and can be configured to use nano or Notepad++ straight from the installer. – Mohammad Dehghan Mar 15 '18 at 19:43
It Vi and you have to write your message.
If you are unfamiliar with VI i recommend to go over this interactive tutorial
To edit the file and to write your commit message (insert mode)
i
To save your data:
Write + quit: ESC + : + w + q + Enter
To save your without saving data:
Write + quit: ESC + : + q + ! + Enter

- 1
- 1

- 128,036
- 21
- 144
- 167
-
`ESC`+`w`+`q` does not work for me. But `ESC` + `:` + `w` + `q` + `ENTER` works. What am I doing wrong? – Ves Dec 28 '16 at 11:54
-
1@Ves You aren't doing anything wrong, the answer just didn't mention those keys; I've added them. – Dan Lowe Dec 28 '16 at 13:45
try git config --global core.editor (any editor of your choice or if you have any of the following: Atom / Sublimetext/ notepad++/ notepad / etc)
in either Visual studio terminal while coding for git or in any command line.
example:- git config --global core.editor Atom

- 39
- 8