【git】vscode添加git bash终端

我的vscode版本:1.99.3

1.打开一个vscode的terminal,点击加号旁边的下拉小三角,找到configure terminal settings

 

2.找到windows这一栏,点击edit in settings.json

 

3.配置如下:

{
        "terminal.integrated.profiles.windows": {
        "PowerShell": {
            "source": "PowerShell",
            "icon": "terminal-powershell"
        },
        "Command Prompt": {
            "path": [
                "${env:windir}\\Sysnative\\cmd.exe",
                "${env:windir}\\System32\\cmd.exe"
            ],
            "args": [],
            "icon": "terminal-cmd"
        },
        "gitBash": {
            "path": "D:\\Git\\bin\\bash.exe", //修改为Git-bash安装的实际路径,..(D:):\\...\\bin\\bash.exe
            "args": []
        }
    },
    "terminal.integrated.defaultProfile.windows": "gitBash",
}

 

posted @ 2025-04-24 09:17  leah-xx  阅读(90)  评论(0)    收藏  举报