首先计算机要安装了git;
打开settings.json 文件(打开方式: 文件 》 首选项 》 设置),搜索 terminal.integrated.shell.windows,参考如下内容配置集成git。
// "terminal.integrated.shell.windows": "C:\\Windows\\System32\\cmd.exe",
// Command Prompt
"terminal.integrated.shell.windows": "C:\\Windows\\System32\\cmd.exe",
// PowerShell
"terminal.integrated.shell.windows": "C:\\Windows\\System32\\WindowsPowerShell\\v1.0\\powershell.exe",
// Git Bash
"terminal.integrated.shell.windows": "D:\\Program Files\\Git\\git-cmd.exe",
"terminal.integrated.shellArgs.windows": [
"--command=usr/bin/bash.exe",
"-l",
"-i"
]
"git.enableSmartCommit": true,