How can I set up an editor to work with Git on Windows?

Posted by Patrick McElhaney on Stack Overflow See other posts from Stack Overflow or by Patrick McElhaney
Published on 2008-08-14T01:43:04Z Indexed on 2010/04/06 9:43 UTC
Read the original article Hit count: 311

Filed under:
|
|

I'm trying out Git on Windows. I got to the point of trying "git commit" and I got this error:

Terminal is dumb but no VISUAL nor EDITOR defined. Please supply the message using either -m or -F option.

So I figured out I need to have an environment variable called EDITOR. No problem. I set it to point to Notepad.

That worked, almost. The default commit message opens in Notepad. But Notepad doesn't support bare line feeds.

I went out and got Notepad++. But I can't figure out how to get Notepad++ set up as the %EDITOR% in such a way that it works with Git as expected.

I'm not married to Notepad++. At this point I couldn't care less what editor I use. I just want to be able to type my commit messages without using -m.

So, for those of you using Git on Windows: What (free) tool do you use to edit your commit message, and what do you get when you type echo %EDITOR% at the command prompt?

© Stack Overflow or respective owner

Related posts about Windows

Related posts about git