How to fix “git-sh-setup: file not found” in windows?

I’ve run into this issue with the latest Git on Windows (v2.17.1.windows.2) and solved it both for cmd and PowerShell by adding two directories to PATH:

  • C:\Program Files\Git\usr\bin
  • C:\Program Files\Git\mingw64\libexec\git-core

enter image description here

From elevated powershell you could set it using:

$env:Path += ";c:\Program Files\Git\usr\bin;C:\Program Files\Git\mingw64\libexec\git-core"
Set-ItemProperty -Path 'Registry::HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\Session Manager\Environment' -Name PATH -Value $env:Path

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)