Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Where is git.exe located?

I have PyCharm and I am looking around trying to find git.exe to set it up with my repo.

What is the PATH to git.exe?

like image 269
Angus Moore Avatar asked Aug 13 '12 05:08

Angus Moore


People also ask

How do I know if git is installed Windows?

Open the command prompt "terminal" and type git version to verify Git was installed.

What is git exe path TortoiseGit?

The TortoiseGit Git.exe Path setting currently points to C:\Program Files\Git\cmd . In the TortoiseGit documentation it states. There is a known issue in msysGit/Git for Windows: Git for Windows provides two git.exe-files (one in a folder named bin and one in a folder named cmd).

Which executable is installed git on Windows?

Go to Git's download page and click “Windows”. An .exe file should be downloaded to your “Downloads” folder. Open the downloaded Git .exe file. You will see a screen containing the license.


2 Answers

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.

like image 78
4 revs, 4 users 40% Avatar answered Sep 19 '22 14:09

4 revs, 4 users 40%


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 
like image 23
VonC Avatar answered Sep 19 '22 14:09

VonC