Configure Visual Studio Code as Your git Editor

23 Feb 2020

I use VSCode as my text editor for git, and every time I install git I have to search for this comment on Stack Overflow for the right command to configure this, since it doesn’t open up a new VSCode window by default.

git config --global core.editor "code --new-window --wait"

Installing git on Windows

The default editor can be configured in the installation wizard in Windows. Uncheck ‘Only show new options’ to ensure that this step is shown.

Set default git editor when installing on Windows
The default git editor can be set when installing on Windows. Test the custom editor to enable the Next button.