Recently installed Github Desktop and it wants to find git.exe on the path. I have Git installed in C:/PortableGit. I added C:/PortableGit/bin to my System path. I verified it's there. If I open a CMD window window and type "git" I get 'git' is not recognized as in internal or external command. If I navigate in the CMD window to c:/PortableGit/bin and type "git" I get the same error. Works if I type "git.exe".

How is this happening? Has my system been messed up such that EXE is no longer recognized? Wouldn't other things be badly broken if this were true?

Note: Tried other versions of Git in other locations, same result.

Output of PATH command: PATH=C:\portablegit\bin;C:\Oracle\product\11.2.0\client\bin;C:\Oracle\product\11.2.0\client_64\bin;C:\Program Files (x86)\CheckPoint\Endpoint Security\Endpoint Common\bin;C:\Program Files (x86)\Common Files\Oracle\Java\javapath;C:\Program Files (x86)\HID Global\ActivClient\;C:\Program Files (x86)\Microsoft ASP.NET\ASP.NET Web Pages\v1.0\;C:\Program Files (x86)\Microsoft SQL Server\110\DTS\Binn\;C:\Program Files (x86)\Microsoft SQL Server\110\Tools\Binn\;C:\Program Files (x86)\Microsoft SQL Server\110\Tools\Binn\ManagementStudio\;C:\Program Files (x86)\Microsoft SQL Server\120\DTS\Binn\;C:\Program Files (x86)\Microsoft SQL Server\130\DTS\Binn\;C:\Program Files (x86)\Microsoft SQL Server\140\DTS\Binn\;C:\Program Files (x86)\Microsoft SQL Server\140\Tools\Binn\;C:\Program Files (x86)\Microsoft SQL Server\140\Tools\Binn\ManagementStudio\;C:\Program Files (x86)\Microsoft SQL Server\Client SDK\ODBC\130\Tools\Binn\;C:\Program Files (x86)\Microsoft Visual Studio 11.0\Common7\IDE\PrivateAssemblies\;C:\Program Files (x86)\Plantronics\Spokes3G\;C:\Program Files (x86)\PuTTY\;C:\Program Files (x86)\Windows Kits\8.1\Windows Performance Toolkit\;C:\Program Files\Adobe\Adobe PDF iFilter 11 for 64-bit platforms\bin\;C:\Program Files\apache-maven-3.5.3\bin;C:\Program Files\Common Files\Intel\WirelessCommon\;C:\Program Files\dotnet\;C:\Program Files\HID Global\ActivClient\;C:\Program Files\IBM\WebSphere MQ\bin;C:\Program Files\IBM\WebSphere MQ\bin64;C:\Program Files\IBM\WebSphere MQ\tools\c\samples\bin;C:\Program Files\Intel\WiFi\bin\;C:\Program Files\Java\jdk1.8.0_211\bin;C:\Program Files\Kindel Systems\winprint\;C:\Program Files\Microsoft SQL Server\110\Tools\Binn\;C:\Program Files\Microsoft SQL Server\120\Tools\Binn\;C:\Program Files\Microsoft SQL Server\130\Tools\Binn\;C:\Program Files\Microsoft SQL Server\Client SDK\ODBC\170\Tools\Binn\;C:\Program Files\Microsoft VS Code\bin;C:\Program Files\nodejs\;C:\Program Files\PowerShell\7\;C:\Program Files\TortoiseGit\bin;C:\Program Files\TortoiseSVN\bin;C:\ProgramData\chocolatey\bin;C:\Users\rs02130\AppData\Local\GitHubDesktop\bin;C:\Users\rs02130\AppData\Local\Microsoft\WindowsApps;C:\Users\rs02130\AppData\Local\Pandoc\;C:\Users\rs02130\AppData\Local\Programs\Git\cmd;C:\Users\rs02130\AppData\Local\Programs\Microsoft VS Code\bin;C:\Users\rs02130\AppData\Roaming\npm;C:\WINDOWS;C:\WINDOWS\system32;C:\WINDOWS\System32\OpenSSH\;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\WindowsPowerShell\v1.0\;C:\Program Files (x86)\Plantronics\Spokes3G\


I had a user PATHEXT with .RB. I deleted that.

I can run EXEs from C:/WINDOWS (Notepad, Py)

  • 1
    What other programs have you attempted to start (cmd.exe seems to work, after all)? Have you tried executing it as .\git.exe while inside the folder where it is located? Did you add the path with forward slashes to the environment variable PATH? If so, have you tried the conventional backslashes? I know NT is supposed to also deal with /, but I'm not sure that's true for the environment variables. If you are in that folder and execute dir git*.* what does it give you? Apr 16, 2020 at 20:09
  • 1
    Please edit the question and add the output of echo %path%.
    – DavidPostill
    Apr 16, 2020 at 20:10
  • This should be asked on superuser.com. Your paths are wrong, you screwed up your path extension. PATHEXT=.COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH;.MSC.
    – Mark
    Apr 16, 2020 at 22:48

1 Answer 1


I had a user PATHEXT with .RB. I deleted that. Seems to have fixed all the issues.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .