Installation

  1. Download the latest version of Git for Windows.

  2. Run the installation file as an administrator (right click on the Git .exe file » “Run as administrator”).

  3. Make sure the installation path is set to C:\Program Files\Git.

  4. On the “default editor used by Git” step, choose Use Visual Studio Code as Git's default editor.

Bonus

We can also set Git Bash as the default terminal in Visual Studio Code:

  1. Open Visual Studio Code.

  2. “Terminal” » “New Terminal”.

  3. Click the small arrow icon next to the plus icon on the right side of the terminal panel » “Select Default Profile”.

  4. Select “Git Bash”.

The next time we open a new terminal in Visual Studio Code, it will automatically use Git Bash.

References