1,920,248
Downloads
35,377
Downloads of v 2.10.0
9/3/2016
Last update
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'/WindowsTerminal
- this makes vim use the regular Windows terminal instead of MinTTY terminal
These parameters can be passed to the installer with the use of -params
.
For example: -params '"/GitAndUnixToolsOnPath /NoAutoCrlf"'
.
To install Git (Install), run the following command from the command line or from PowerShell:
C:\> choco install git.install
--version 2.10.0
To upgrade Git (Install), run the following command from the command line or from PowerShell:
C:\> choco upgrade git.install
--version 2.10.0
Files
Hide- tools\chocolateyInstall.ps1
Show
$registryKeyName = 'Git_is1' $packageId = 'git.install' $fileType = 'exe' $fileArgs = $( '/VERYSILENT /NORESTART /NOCANCEL /SP- ' + '/COMPONENTS="icons,icons\quicklaunch,ext,ext\shellhere,ext\guihere,assoc,assoc_sh" /LOG' ) $url = 'https://github.com/git-for-windows/git/releases/download/v2.10.0.windows.1/Git-2.10.0-32-bit.exe' $url64 = 'https://github.com/git-for-windows/git/releases/download/v2.10.0.windows.1/Git-2.10.0-64-bit.exe' $arguments = @{}; # /GitOnlyOnPath /GitAndUnixToolsOnPath /NoAutoCrlf $packageParameters = $env:chocolateyPackageParameters; # Default the values $useWindowsTerminal = $false $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 | % { $arguments.Add( $_.Groups[$option_name].Value.Trim(), $_.Groups[$value_name].Value.Trim()) } } else { 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("WindowsTerminal")) { Write-Host "You do not want to use MinTTY terminal" $useWindowsTerminal = $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 ($useWindowsTerminal) { # update registry so installer picks it up automatically New-ItemProperty $installKey -Name "Inno Setup CodeFile: Bash Terminal Option" -Value "ConHost" -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."
Virus Scan Results
- git.install.2.10.0.nupkg (4f27eda2474b) - ## / 56 - Log in or click on link to see number of positives
- Git-2.10.0-64-bit.exe (d624e08991a7) - ## / 55 - Log in or click on link to see number of positives
- Git-2.10.0-32-bit.exe (5d565da086a0) - ## / 58 - Log in or click on link to see number of positives
Dependencies
This package has no dependencies.
Package Maintainer(s)
Software Author(s)
Tags
Version History
Version | Downloads | Last updated | Status |
---|---|---|---|
Git (Install) 2.17.0 | 44271 | Tuesday, April 3, 2018 | approved |
Git (Install) 2.16.3 | 30180 | Friday, March 23, 2018 | approved |
Git (Install) 2.16.2 | 72252 | Wednesday, February 21, 2018 | approved |
Git (Install) 2.16.1.4 | 38704 | Thursday, February 8, 2018 | approved |
Git (Install) 2.16.1.3 | 3925 | Wednesday, February 7, 2018 | approved |
Git (Install) 2.16.1.2 | 13433 | Saturday, February 3, 2018 | approved |
Git (Install) 2.16.1 | 34326 | Monday, January 22, 2018 | approved |
Git (Install) 2.16.0.2 | 11358 | Friday, January 19, 2018 | approved |
Git (Install) 2.15.1.2 | 86077 | Thursday, November 30, 2017 | approved |
Git (Install) 2.15.1 | 5179 | Wednesday, November 29, 2017 | approved |
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.