在vscode中使用git前,下载git免安装版解压到目录。settings.json中需要设置"git.path": "D:\\data\\git\\PortableGit\\bin\\git.exe"重启vscode后生效。