Where is git.exe located? Where is git.exe located? git git

Where is git.exe located?


If you're using GitHub for Windows, git.exe may not be in your PATH, but you may find it in a location like: C:\Users\<username>\AppData\Local\GitHub\PortableGit_<numbersandletters>\bin\git.exe

That's the situation for me, in Windows 7 + version 1.0 of GitHub for Windows.

In Windows 10 it appears to be in:

C:\Users\<username>\AppData\Local\GitHub\PortableGit_<numbersandletters>\cmd\git.exe

( \cmd versus \bin)

From GitHub Desktop 1.1

The UI is different and the Git path now is in:

C:\Users\<username>\AppData\Local\GitHubDesktop\app-<appversion>\resources\app\git\cmd\git.exe

PS: AppData is a hidden folder by default.


If git.exe is indeed in your %PATH% (that is, if you can type a git --version in a DOS windows), then which git.exe will tell you where.
(provided you did install GoW: Gnu on Windows: 130 unix commands compiled for windows, including which).

Jonny Leeds comments below that you also can use where git.exe
(except with Powershell, for you need to use where.exe git.exe, instead of the PowerShell command where)

If not, don't forget you can install git wherever you want, with the portable version of msysgit. It is just an archive you unzip in any directory of your choice.

Update 2015: use the portable version of "git-for-windows", like:

PortableGit-2.4.4.2-3rd-release-candidate-64-bit.7z.exe

Then add to %PATH%:

  • c:\path\to\PortableGit-2.4.4.2-3rd-release-candidate-64-bit\cmd
  • c:\path\to\PortableGit-2.4.4.2-3rd-release-candidate-64-bit\usr\bin

You will not only get git.exe, but also 200+ executable for Unix commands! No more GnuOnWindows to install.
See more at "Why is it that if you download Git 2.0 from the net, you always get a 1.9.4 installer package?".


More recently (2017), from Luke McGregor's answer, for the new GitHub Desktop:

"%LOCALAPPDATA%\GitHubDesktop\app-[gfw-version]\resources\app\git\cmd\git.exe"For instance: %LOCALAPPDATA%\GitHubDesktop\app-1.0.1\resources\app\git\cmd


I'm very surprised to see that no one mentioned using the --exec-path switch.

git --exec-path

C:\Program Files\Git\mingw64/libexec/git-core

I hope this helps someone.