Installation
Download the latest version of Git for Windows.
Run the installation file as an administrator (right click on the Git
.exe
file » “Run as administrator”).Make sure the installation path is set to
C:\Program Files\Git
.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:
Open Visual Studio Code.
“Terminal” » “New Terminal”.
Click the small arrow icon next to the plus icon on the right side of the terminal panel » “Select Default Profile”.
Select “Git Bash”.
The next time we open a new terminal in Visual Studio Code, it will automatically use Git Bash.