Skip to content

Add an installer argument to skip installing git bash #2912

Description

@jantari

I was not able to find an open or closed issue matching what I'm seeing

Setup

  • Which version of Git for Windows are you using? Is it 32-bit or 64-bit?

    2.29.2.2 (amd64)

$ git --version --build-options

git version 2.29.2.windows.2
cpu: x86_64
built from commit: 3464b98ce6803c98bf8fb34390cd150d66e4a0d3
sizeof-long: 4
sizeof-size_t: 8
shell-path: /bin/sh
  • Which version of Windows are you running? Vista, 7, 8, 10? Is it 32-bit or 64-bit?
$ cmd.exe /c ver

Microsoft Windows [Version 10.0.19042.630]
  • What options did you set as part of the installation? Or did you choose the
    defaults?

Prior to installation:

$installKey = "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\Git_is1"
$ino = "Inno Setup CodeFile:"

if (-not (Test-Path $installKey) {
    mkdir $installKey
}

# Use standard windows terminal/conhost, no git bash
New-ItemProperty $InstallKey -Name "$ino Bash Terminal Option" -Value "ConHost" -PropertyType "String" -Force

# Only add git to PATH, not other unix tools
New-ItemProperty $installKey -Name "$ino Path Option" -Value "Cmd" -PropertyType "String" -Force

# Use SCHANNEL tls-backend instead of openssl
New-ItemProperty $InstallKey -Name "$ino CURL Option" -Value "WinSSL" -Force

During installation:

/VERYSILENT /NORESTART /NOCANCEL /SP- /CLOSEAPPLICATIONS /RESTARTAPPLICATIONS /COMPONENTS="ext,ext\shellhere,ext\guihere,gitlfs,assoc,assoc_sh"

After Installation:

[System.Environment]::SetEnvironmentVariable('GCM_VALIDATE', 'false', 'Machine')

Configuration

$ cat "C:\Program Files\Git\etc\install-options.txt"

Editor Option: VisualStudioCode
Custom Editor Path:
Default Branch Option:
Path Option: Cmd
SSH Option: OpenSSH
Tortoise Option: false
CURL Option: WinSSL
CRLF Option: CRLFAlways
Bash Terminal Option: ConHost
Git Pull Behavior Option: Merge
Use Credential Manager: Core
Performance Tweaks FSCache: Enabled
Enable Symlinks: Enabled
Enable Pseudo Console Support: Disabled
  • Any other interesting things about your environment that might be related
    to the issue you're seeing?

I don't think so, might edit later.

Details

  • Which terminal/shell are you running Git from? e.g Bash/CMD/PowerShell/other

Always PowerShell 7.

# None
  • What did you expect to occur after running these commands?

Not applicable.

  • What actually happened instead?

Not applicable.

  • If the problem was occurring with a specific repository, can you provide the
    URL to that repository to help us with testing?

Not applicable.


I never use git-bash and find it wholly unneccessary. When installing git for windows manually I always deselect it as I prefer using PowerShell on Windows. However, for a silent/unattended installation this option is not exposed.

Please add a COMPONENTS or other cli option to the installer to not install git-bash.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions