Skip to content

Instantly share code, notes, and snippets.

@roessland
Created November 17, 2019 14:35
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save roessland/a35ace3d995bfbe4730b94537018b9d1 to your computer and use it in GitHub Desktop.
Save roessland/a35ace3d995bfbe4730b94537018b9d1 to your computer and use it in GitHub Desktop.
Add git.exe to path without adding sh.exe and bash.exe using PowerShell
$a = Get-Item 'C:\Program Files\Git\bin\git.exe'
$b = New-Item "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\App Paths\$($a.BaseName).exe"
$b.SetValue("", $a.FullName)
$b.SetValue("Path", $a.DirectoryName + '\')
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment