79597026

Date: 2025-04-28 17:47:35
Score: 1
Natty:
Report link

So I found that PowerShell was acting up with my git as well.

I ran these commands to find that PowerShell recognized a broken version of git still buried in my Windows system 32 folder: "C:\Program Files\Git\bin> (Get-Command git).CommandType

\>>

Application

C:\Program Files\Git\bin> (Get-Command git).Source

\>>

C:\windows\system32\git

C:\Program Files\Git\bin> (Get-Command git).Definition

\>>

C:\windows\system32\git".

After I found and deleted the bad git.exe file in my system32 folder, I was able to run: "git -v" anywhere in powershell because it then was able to recognize the source folder for my main git installation in my "C:\Program Files\Git\bin".

Other terminals like CMD and Git Bash can find the right location right away, even if you have your environment variables set up properly, but then PowerShell is very particular, which is both a pro and con depending on how you look at it. It just forces you to clean up your system when working at runtime with it.

Reasons:
  • Long answer (-0.5):
  • No code block (0.5):
  • Low reputation (1):
Posted by: Jeff Pitcher