Change GIT Editor

By default the git commands that require an editor would use ‘vi’, but if you can add an entry into your global git config to change the editor to Notepad++. To change to some other editor such as Notepad++ or Textpad you can add these lines to the global git config.  For example:

[core]
   editor = '/C/Program Files (x86)/Notepad++/notepad++.exe' -multiInst -notabbar -nosession -noPlugin

OR

[core]
   editor = '/C/Program Files (x86)/TextPad 5/TextPad.exe' -m

Either edit the global config manually or you can run this git command

git config --global core.editor '/D/ProgramFiles/Notepad++/notepad++.exe -multiInst -notabbar -nosession -noPlugin'

NOTE: If your editor path contains spaces you could have trouble running the above git command. Recommend to just edit the global config directly in that case to ensure the editor gets added correctly.

2 thoughts on “Change GIT Editor

  1. The TextPad as and editor doesn’t work no matter what I try. I did enter a message but still got “aborting commit…”:

    xxxxxx /c/projects/IndexSearchRnD (master)
    $ git config –global core.editor “‘C:\Program Files (x86)\TextPad 5\TextPad.exe’ -m”

    xxxxxx /c/projects/IndexSearchRnD (master)
    $ git commit
    Aborting commit due to empty commit message.

    xxxxxx /c/projects/IndexSearchRnD (master)

  2. You may try this command. It worked for me

    git config –global core.editor ‘”c:\Program Files (x86)\TextPad 4\TextPad.exe”‘ -m

Comments are closed.