Downloads of v 2.7.0:


Last Update:

05 Jan 2016

Package Maintainer(s):

Software Author(s):

  • Johannes Schindelin
  • msysgit Committers


git vcs dvcs version control msysgit admin

Git (Install)

This is not the latest version of Git (Install) available.

  • 1
  • 2
  • 3

2.7.0 | Updated: 05 Jan 2016



Downloads of v 2.7.0:



Software Author(s):

  • Johannes Schindelin
  • msysgit Committers

  • 1
  • 2
  • 3
Git (Install) 2.7.0

This is not the latest version of Git (Install) available.

  • 1
  • 2
  • 3

Some Checks Have Failed or Are Not Yet Complete

Not All Tests Have Passed

Validation Testing Pending

Verification Testing Passed


Scan Testing Successful:

No detections found in any package files

Learn More

Deployment Method: Individual Install, Upgrade, & Uninstall

To install Git (Install), run the following command from the command line or from PowerShell:


To upgrade Git (Install), run the following command from the command line or from PowerShell:


To uninstall Git (Install), run the following command from the command line or from PowerShell:


Deployment Method:

📝 NOTE: This applies to both open source and commercial editions of Chocolatey.

1. Enter Your Internal Repository Url

(this should look similar to

2. Setup Your Environment

1. Ensure you are set for organizational deployment

Please see the organizational deployment guide

2. Get the package into your environment

  • Open Source or Commercial:
    • Proxy Repository - Create a proxy nuget repository on Nexus, Artifactory Pro, or a proxy Chocolatey repository on ProGet. Point your upstream to Packages cache on first access automatically. Make sure your choco clients are using your proxy repository as a source and NOT the default community repository. See source command for more information.
    • You can also just download the package and push it to a repository Download

3. Copy Your Script

choco upgrade git.install -y --source="'INTERNAL REPO URL'" --version="'2.7.0'" [other options]

See options you can pass to upgrade.

See best practices for scripting.

Add this to a PowerShell script or use a Batch script with tools and in places where you are calling directly to Chocolatey. If you are integrating, keep in mind enhanced exit codes.

If you do use a PowerShell script, use the following to ensure bad exit codes are shown as failures:

choco upgrade git.install -y --source="'INTERNAL REPO URL'" --version="'2.7.0'" 

Write-Verbose "Exit code was $exitCode"
$validExitCodes = @(0, 1605, 1614, 1641, 3010)
if ($validExitCodes -contains $exitCode) {
  Exit 0

Exit $exitCode

- name: Install git.install
    name: git.install
    version: '2.7.0'
    state: present

See docs at

chocolatey_package 'git.install' do
  action    :install
  source   'INTERNAL REPO URL'
  version  '2.7.0'

See docs at

cChocoPackageInstaller git.install
    Name     = "git.install"
    Version  = "2.7.0"
    Source   = "INTERNAL REPO URL"

Requires cChoco DSC Resource. See docs at

package { 'git.install':
  ensure   => '2.7.0',
  provider => 'chocolatey',
  source   => 'INTERNAL REPO URL',

Requires Puppet Chocolatey Provider module. See docs at

4. If applicable - Chocolatey configuration/installation

See infrastructure management matrix for Chocolatey configuration elements and examples.

Private CDN cached downloads available for licensed customers. Never experience 404 breakages again! Learn more...

This package is likely a meta/virtual (*) or an installer (*.install) or portable (*.portable) application package.

  • Meta/virtual (*) - has a dependency on the *.install or the *.portable package - it is provided for discoverability and for other packages to take a dependency on.
  • Portable (*.portable/*.commandline (deprecated naming convention)/*.tool (deprecated naming convention)) - usually zips or archives that require no administrative access to install.
  • Install (*.install/*.app (deprecated naming convention)) - uses native installers, usually requires administrative access to install.

Learn more about chocolatey's distinction of installed versus portable apps and/or learn about this kind of package.

This package was approved as a trusted package on 05 Jan 2016.


Git (for Windows) – Git is a powerful distributed Source Code Management tool. If you just want to use Git to do your version control in Windows, you will need to download Git for Windows, run the installer, and you are ready to start.

Note: Git for Windows is a project run by volunteers, so if you want it to improve, volunteer!

Package Specifics

The package uses default install options minus cheetah integration and desktop icons. Cheetah prevents a good upgrade scenario, so it has been removed.

Package Parameters

The following package parameters can be set:

  • /GitOnlyOnPath - this puts gitinstall\cmd on path. This is also done by default if no package parameters are set.
  • /GitAndUnixToolsOnPath - this puts gitinstall\bin on path. This setting will override /GitOnlyOnPath.
  • /NoAutoCrlf - this setting only affects new installs, it will not override an existing .gitconfig. This will ensure 'Checkout as is, commit as is'

These parameters can be passed to the installer with the use of -params.
For example: -params '"/GitAndUnixToolsOnPath /NoAutoCrlf"'.

$registryKeyName = 'Git_is1'
$packageId = 'git.install'
$fileType = 'exe'
$fileArgs = $(
  '/NOICONS /COMPONENTS="icons,icons\quicklaunch,ext,ext\reg,ext\reg\shellhere,ext\reg\guihere,assoc,assoc_sh" /LOG'
$url = ''
$url64 = ''

$arguments = @{};
# /GitOnlyOnPath /GitAndUnixToolsOnPath /NoAutoCrlf
$packageParameters = $env:chocolateyPackageParameters;

# Default the values
$gitCmdOnly = $false
$unixTools = $false
$noAutoCrlf = $false # this does nothing unless true

# Now parse the packageParameters using good old regular expression
if ($packageParameters) {
    $match_pattern = "\/(?<option>([a-zA-Z]+)):(?<value>([`"'])?([a-zA-Z0-9- _\\:\.]+)([`"'])?)|\/(?<option>([a-zA-Z]+))"
    $option_name = 'option'
    $value_name = 'value'

    if ($packageParameters -match $match_pattern ){
        $results = $packageParameters | Select-String $match_pattern -AllMatches
        $results.matches | % {
      throw "Package Parameters were found but were invalid (REGEX Failure)"

    if ($arguments.ContainsKey("GitOnlyOnPath")) {
        Write-Host "You want Git on the command line"
        $gitCmdOnly = $true

    if ($arguments.ContainsKey("GitAndUnixToolsOnPath")) {
        Write-Host "You want Git and Unix Tools on the command line"
        $unixTools = $true

    if ($arguments.ContainsKey("NoAutoCrlf")) {
        Write-Host "Ensuring core.autocrlf is false on first time install only"
        Write-Host " This setting will not adjust an already existing .gitconfig setting."
        $noAutoCrlf = $true
} else {
    Write-Debug "No Package Parameters Passed in";

$is64bit = (Get-ProcessorBits) -eq 64
$installKey = "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\$registryKeyName"
if ($is64bit -eq $true -and $env:chocolateyForceX86 -eq $true) {
  $installKey = "HKLM:\SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Uninstall\$registryKeyName"

$userInstallKey = "HKCU:\Software\Microsoft\Windows\CurrentVersion\Uninstall\$registryKeyName"
if (Test-Path $userInstallKey) {
  $installKey = $userInstallKey

if ( -not (Test-Path $installKey)) {
  New-Item -Path $installKey | Out-Null

if ($gitCmdOnly) {
  # update registry so installer picks it up automatically
  New-ItemProperty $installKey -Name "Inno Setup CodeFile: Path Option" -Value "Cmd" -PropertyType "String" -Force | Out-Null

if ($unixTools) {
  # update registry so installer picks it up automatically
  New-ItemProperty $installKey -Name "Inno Setup CodeFile: Path Option" -Value "CmdTools" -PropertyType "String" -Force | Out-Null

if ($noAutoCrlf) {
  # update registry so installer picks it up automatically
  New-ItemProperty $installKey -Name "Inno Setup CodeFile: CRLF Option" -Value "CRLFCommitAsIs" -PropertyType "String" -Force | Out-Null

# Make our install work properly when running under SYSTEM account (Chef Cliet Service, Puppet Service, etc)
# Add other items to this if block or use $IsRunningUnderSystemAccount to adjust existing logic that needs changing
$IsRunningUnderSystemAccount = ([System.Security.Principal.WindowsIdentity]::GetCurrent()).IsSystem
If ($IsRunningUnderSystemAccount)
  #strip out quicklaunch parameter as it causes a hang under SYSTEM account
  $fileArgs = $fileArgs.replace('icons\quicklaunch,','')
  If ($fileArgs -inotlike "*/SUPPRESSMSGBOXES*")
    $fileArgs = $fileArgs + ' /SUPPRESSMSGBOXES'

If ([bool](get-process ssh-agent -ErrorAction SilentlyContinue))
  Write-Output "Killing any git ssh-agent instances for install."
  (get-process ssh-agent | where {$_.Path -ilike "*\git\usr\bin\*"}) | stop-process

Install-ChocolateyPackage $packageId $fileType $fileArgs $url $url64

if (Test-Path $installKey) {
  $keyNames = Get-ItemProperty -Path $installKey

  if ($gitCmdOnly -eq $false -and $unixTools -eq $false) {
    $installLocation = $keyNames.InstallLocation
    if ($installLocation -ne '') {
      $gitPath = Join-Path $installLocation 'cmd'
      Install-ChocolateyPath $gitPath 'Machine'

Write-Warning "Git installed - You may need to close and reopen your shell for PATH changes to take effect."

Log in or click on link to see number of positives.

In cases where actual malware is found, the packages are subject to removal. Software sometimes has false positives. Moderators do not necessarily validate the safety of the underlying software, only that a package retrieves software from the official distribution point and/or validate embedded software against official distribution point (where distribution rights allow redistribution).

Chocolatey Pro provides runtime protection from possible malware.

Add to Builder Version Downloads Last Updated Status
Git (Install) 2.35.3 45086 Friday, April 15, 2022 Approved
Git (Install) 2.35.2 39993 Tuesday, April 12, 2022 Approved
Git (Install) 337906 Tuesday, February 1, 2022 Approved
Git (Install) 2.35.1 34501 Saturday, January 29, 2022 Approved
Git (Install) 2.35.0 45084 Tuesday, January 25, 2022 Approved
Git (Install) 2.34.1 270117 Thursday, November 25, 2021 Approved
Git (Install) 2.34.0 93318 Tuesday, November 16, 2021 Approved
Git (Install) 2.33.1 180159 Thursday, October 14, 2021 Approved
Git (Install) 235949 Tuesday, August 24, 2021 Approved

This package has no dependencies.

Discussion for the Git (Install) Package

Ground Rules:

  • This discussion is only about Git (Install) and the Git (Install) package. If you have feedback for Chocolatey, please contact the Google Group.
  • This discussion will carry over multiple versions. If you have a comment about a particular version, please note that in your comments.
  • The maintainers of this Chocolatey Package will be notified about new comments that are posted to this Disqus thread, however, it is NOT a guarantee that you will get a response. If you do not hear back from the maintainers after posting a message below, please follow up by using the link on the left side of this page or follow this link to contact maintainers. If you still hear nothing back, please follow the package triage process.
  • Tell us what you love about the package or Git (Install), or tell us what needs improvement.
  • Share your experiences with the package, or extra configuration or gotchas that you've found.
  • If you use a url, the comment will be flagged for moderation until you've been whitelisted. Disqus moderated comments are approved on a weekly schedule if not sooner. It could take between 1-5 days for your comment to show up.
comments powered by Disqus