12

我想将 git bash 添加到 windows 终端,但是,当我在终端中添加一个新的 git bash 选项卡时,git bash 会在另一个窗口中打开。

这是我的配置:

{
    "guid": "{--------------------}",
    "acrylicOpacity" : 0.75,
    "closeOnExit" : true,
    "colorScheme" : "Campbell",
    "commandline" : "C:\\Users\\anonymous\\AppData\\Local\\Programs\\Git\\git-bash.exe",
    "cursorColor" : "#FFFFFF",
    "cursorShape" : "bar",
    "fontFace" : "Consolas",
    "fontSize" : 10,
    "historySize" : 9001,
    "icon" : "C:\\Program Files\\Git\\mingw64\\share\\git\\git-for-windows.ico",
    "name" : "Git Bash",
    "padding" : "0, 0, 0, 0",
    "snapOnInput" : true,
    "useAcrylic" : true
}

输出:

在此处输入图像描述

我错过了什么?

4

3 回答 3

20

我不知道这是否是正确的解决方案,但我尝试将其更改为打开sh.exebin 文件夹中的参数--login,现在它可以工作了。

编辑

正如评论中提到的,bash.exe也可以工作。(bin文件夹中的任何内容)

于 2020-05-23T08:03:50.333 回答
1

在终端中添加配置文件时选择git-cmd而不是git-bash

于 2021-10-02T07:17:25.283 回答
0

如果您使用 scoop 安装 git,则可以C:\Users\xxxxx\scoop\apps\git\current\bin\bash.exe用作命令行

于 2022-02-20T23:05:22.157 回答