Vscode 设置git bash为默认终端

发布时间 2023-08-17 00:35:00作者: 风中虹衣客

1.文件-》首选项-》设置-》功能-》终端

2.点击上图中的在settings.json中编辑,添加如下信息:

{
"terminal.integrated.profiles.windows": {
        "PowerShell -NoProfile": {
        "source": "PowerShell",
        "args": [
        "-NoProfile"
        ]
        },
        "Git-Bash": {
        "path": "D:\\tools\\Git\\bin\\bash.exe",
        "args": []
        }
    },
    "terminal.integrated.defaultProfile.windows": "Git Bash",

}

点击vscode 上方的终端-》新建终端-》加号旁的展开-》选择默认配置文件,选则gitbash的配置文件。