How to change the default Git editor to Notepad++ not Vim |Video upload date:  · Duration: PT4M11S  · Language: EN

Set Notepad++ as the default Git editor on Windows so commit messages open in Notepad++ instead of Vim using a simple Git config command.

If Vim keeps hijacking your commit messages and you secretly want a friendly GUI that does not judge your grammar Notepad++ is the obvious escape route. This short guide shows how to set Notepad++ as the default Git editor on Windows so commit messages open in a window you can actually navigate.

What you need before you start

Keep these simple checks in your back pocket

  • Notepad++ installed and working
  • Git installed and available from your terminal
  • If Notepad++ is not on your PATH be ready to use its full program path or an environment variable that points to it

Set Notepad++ as the Git editor

Open a terminal that can run Git commands and run the following command. It tells Git to launch Notepad++ for commit messages and to open a fresh window so you are not greeted by last week's chaos.

git config --global core.editor "notepad++ -multiInst -nosession"

The flags mean open a new Notepad++ instance and do not restore the previous session. That keeps your commit editing focused and less dramatic.

If Notepad++ is not on PATH

Use a full path in quotes. A safe option is to reference the Program Files environment variable like this when you need to be explicit.

git config --global core.editor "%ProgramFiles%\\Notepad++\\notepad++.exe" -multiInst -nosession

Replace the path above if you installed to a different folder. The idea is the same make Git run the executable you want.

Test that it actually works

Make a quick commit that triggers an editor window. The simplest way is to run a commit without a message flag so Git will open the configured editor.

git add .
git commit

If Notepad++ opens you win. If something else opens check your PATH and the core.editor value with this command.

git config --global --get core.editor

Troubleshooting tips that save time

  • If you do not see Notepad++ use the where command in a Windows terminal to find the executable path
  • If Git still opens Vim check your global and repo level config because local settings can override global ones
  • If you prefer another editor set core.editor to that program for example code with its wait flag works well for VS Code

How to undo it if you change your mind

Reverting is painless. Either unset the core.editor or replace it with something else.

git config --global --unset core.editor
git config --global core.editor "code --wait"

That is it. You have stopped Vim from opening your commit messages and given Notepad++ the job. Enjoy commits in a familiar window and save yourself a few minutes and a little keyboard angst each day.

I know how you can get Azure Certified, Google Cloud Certified and AWS Certified. It's a cool certification exam simulator site called certificationexams.pro. Check it out, and tell them Cameron sent ya!

This is a dedicated watch page for a single video.