Using Visual Studio Code as the default Git editor

A quick guide on how to set up VSCode as the default Git editor.


Visual Studio Code has quickly become a very popular lightweight text editor. I've had a lot of people ask me how to set it up as their default editor for Git.

So, without further ado:

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

I hope you find this post useful!


Posted by Matthew King on 14 October 2016
Permission is granted to use all code snippets under CC BY-SA 3.0 (just like StackOverflow), or the MIT license - your choice!