Using Notepad++ for your git commit messages

December 21, 2010

How can I use Notepad++ to edit my git commit messages?

With spaces and parentheses and plus signs, oh my. With all that in the path to notepad++.exe, how are you supposed to get git to call it properly? With just the right combination of single and double quotes, of course:

$ git config --global core.editor "'C:/Program Files (x86)/Notepad++/notepad++.exe'\
-multiInst -notabbar -nosession -noPlugin"

Thanks, Google and Stack Overflow!

Although… the simplest answer on Stack Overflow, with the most votes, is not the official answer listed at the top. You have to scroll down to see it.

4 comments to Using Notepad++ for your git commit messages

  1. Actually, after using this for a week, I’ve concluded that it’s better without the “-notabbar” argument… If you use “-notabbar”, then the next time you open up Notepad++ after making a git commit, the tabbar is gone, and you have to go show it in the Preferences dialog. I don’t mind having the tab bar there while I’m editing a commit message.

  2. Pingback: How to use Notepadqq for edit git commit messages? – 1OO Club
  3. It was of great help, as I was able to configure the notepad ++ but whenever I was committing any change and if the notepad++ was opened already then commit was aborting by saying “Aborting commit due to empty commit message.”, after configuring it like this my problem is resolved.
    Thanks a lot.

  4. As I have configured my notepad++ and It is working fine but for the repository in which I have executed this command, But when I am working in another repository and when I am making a commit then the same problem is occurring as stated above by me and when I am executing the config command again then it is working fine, But isn’t there any permanent solution to this problem which I am facing?

Leave a Reply