Where is git.exe located?

GitGithub for-Windows

Git Problem Overview


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?

Git Solutions


Solution 1 - Git

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.

Solution 2 - Git

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

Solution 3 - Git

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.

Solution 4 - Git

Just to add to a couple of answers already here:

On Windows, you can use the built in "where" instead of "which" (which is for Linux). So, where git will tell you the location of git assuming that it is in the system path.

If it is not in the system path, and you want a native (no downloads or installations), reasonable time command to find it, use dir /s git.exe

Solution 5 - Git

If you use SourceTree, one instance can be found here:

%USERPROFILE%\AppData\Local\Atlassian\SourceTree\git_local\bin

You can also install quickly via chocolatey. choco install git which will then make it available on your path without any further work on your part.

Solution 6 - Git

type in the command line:

where git.exe

Solution 7 - Git

Here are step by step instructions for you to find out:

  1. If you're using any version of Windows, do Ctrl - Shift - Esc of open Task Manager.
  2. Open GitHub, and look into Task Manager.
  3. There should be something like this: What's in Task Manager when GitHub is open.
  4. Right click the row called GitHub, and select "Open file location".
  5. A window should pop up, showing you where the file is. Github.exe found!


There you go!

You can do this with any application, not just GitHub.

Solution 8 - Git

If you can use the git command it should be in your path? thus this should work asuming linux or linux like os

which git

else also asuming linux like os

cd /
find . -name "*git*"

if on windows tell me what version you are using and I'll help you. The default path on windows is C:\Program Files (x86)\Git.

The name of the executable is not git.exeon all systems.

Solution 9 - Git

It seems like git.exe can be found in different places depending on how it was installed, the version, and version of Windows.

I installed Git-2.6.3-64-bit.exe (cleand install; just git, not the Github Desktop client) on Windows 10 Pro N. This is the default location:

%USERPROFILE%\AppData\Local\Programs\Git\mingw64\bin\git.exe

and

%USERPROFILE%\AppData\Local\Programs\Git\bin

Solution 10 - Git

C:\Users\<username>\AppData\Local\GitHub\PortableGit_<random hash>\cmd\git.exe is where my git.exe is located on Windows 10, Git version 2.10.0.0

Edit: With GitHubDesktop, the location changed to this

C:\Users\<username>\AppData\Local\GitHubDesktop\app-1.0.1\resources\app\git\cmd

or the easier way

%USERPROFILE%\AppData\Local\GitHubDesktop\app-1.0.1\resources\app\git\cmd

Solution 11 - Git

Install git first to your window from

https://git-scm.com/download/win

 Select this path while configuring with git to Android studio
    C:\Program Files\Git\cmd\git.exe

Solution 12 - Git

Sometimes it can be at: C:\Users\user-name\AppData\Local\Programs\Git\cmd. Checking your PATH environment variable for USER and for SYSTEM can give you that.

Solution 13 - Git

Well I just searched for git.exe on my Windows.
Many files returned with names like git-something.exe and git-somethingElse.exe.
Out of those I could find a file with the exact name git.exe. I opened the file and could see cmd with various git commands, which made me decide that it's the correct one.
Pasted the file's path (below) to PyCharm and it worked.

C:\Users\*Username*\AppData\Local\GitHub\PortableGit_cba306e536fdf878271f7fe636a147f7326ad\cmd\git.exe

PS: I installed Git and GitHub through Windows the GitHub's Client Installation.

Solution 14 - Git

In Windows 7 on GitHub 2.5.3.0 I found it in C:\Users(user)\AppData\Local\GitHub\PortableGit_(numbers)\mingw32\bin\git.exe

thanks to dir /s git.exe

Solution 15 - Git

Appears to have moved again in the latest version of GH for windows to:

%USERPROFILE%\AppData\Local\GitHubDesktop\app-[gfw-version]\resources\app\git\cmd\git.exe

Given it now has the version in the folder structure i think it will move every time it auto-updates. This makes it impossible to put into path. I think the best option is to install git separately.

Solution 16 - Git

Check this path:

C:\Program Files\Git\mingw64\libexec\git-core\git.exe

Solution 17 - Git

If you've got the PowerShell-based git installation, you can use the Get-Command object to find git:

Get-Command git.exe | Select-Object -ExpandProperty Definition

Solution 18 - Git

On Windows 10:

I installed git from - https://git-for-windows.github.io/.

After installation i found it at C:\Program Files\Git\bin\git.exe

Solution 19 - Git

For anyone who might not find the other solutions suitable,

I just today downloaded the newest version and the git.exe was located in

C:\Users\<user>\AppData\Local\GitHubDesktop\app-1.0.10\resources\app\git\cmd

Solution 20 - Git

ļ‘‹ GitHub Desktop team member here

> What is the PATH to git.exe?

The version of Git used in GitHub Desktop (or GitHub for Windows) is not intended to be used directly by users, as the path will changes between updates and it might lack some features you need.

I recommend installing Git for Windows which will be installed at a predictable location under C:\Program Files\Git\cmd\git.exe.

Solution 21 - Git

If you have msysgit installed, the path would look like c:\Program Files (x86)\Git\bin\git.exe on a 64-bit system, otherwise just download and install it, PyCharm doesn't come with Git client.

Solution 22 - Git

In windows 8 I found its path as below:

enter image description here

> C:\Program Files (x86)\Git\bin\git.exe

Solution 23 - Git

First ,you should install github in your PC; Second,you can download the tool 'Everything'; Third,open the tool everything ,type git.exe,then you will find the location and copy the location to PyCharm ,and Test,you will see successfully!

Solution 24 - Git

On windows if you have git installed through cygwin (open up cygwin and type git --version to check) then the path will most likely be something like C:\cygwin64\bin\git.exe

Solution 25 - Git

I am working on OSX, and saw this issue. I found xcode disabled git, causing me to agree to the T&Cs again. I fixed by:

  1. in a terminal window, within my project folder: git status
  2. I recieved the following log entry: Agreeing to the Xcode/iOS license requires admin privileges, please re-run as root via sudo.
  3. I ran the following: sudo git status
  4. I then agreed to the T&Cs and everything was hunky dory

Solution 26 - Git

I found it at

C:\Users\~\AppData\Local\GitHub\PortableGit_<some_identifier>\mingw32\libexec\git-core\

Solution 27 - Git

If you are using Git For Windows then it is located at

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

It is nice to have in mind that Git For Windows offers Git CMD, a command prompt with the PATH already set. Git CMD is available as a shortcut in

Start Menu > Programs > Git

among other options.

Solution 28 - Git

Using

  • Git 2.11.0,
  • Windows 10,
  • Android studio 2.2

git.exe location: > C:\Users<.username>\AppData\Local\Programs\Git\cmd\git.exe

Suggestion: while Installing, copy the git path

Solution 29 - Git

After running through this for all answers, did not find path though.
The latest githubdesktop.exe for windows 10 goes into this directory:

C:\ProgramData\<User>\GitHubDesktop\app-1.0.13\GitHubDesktop.exe

Solution 30 - Git

Try looking in C:\Program Files\Git\bin. I have been able to use git.exe located there to setup my repository with PyCharm.

Solution 31 - Git

I have downloaded stub from https://desktop.github.com</a> After installation of the git from the stub, git.exe is stored in the following location.

C:\Users\**User Name**\AppData\Local\GitHub\PortableGit_****Some No/characters***\cmd\git.exe

In Windows 10 64 bit, I feel the exe file is now stored in cmd folder rather than bin folder.

Solution 32 - Git

If you've downloaded the latest version try looking in the CMD folder. git.exe should be in there and should work. You may have to input it's path manually with File>Settings>Version Control>Git

Solution 33 - Git

I am using Windows 10, Pycharm 2016.1.2 and here is the path that i found Github.exe at: (please note that the bold part is variable and you should replace it with applicable values...)

C:\Users**Salman**\AppData\Local\GitHub\PortableGit_c2ba306e536fdf878271f7fe636a147ff37326ad\bin\git.exe

Solution 34 - Git

For me on Windows 10: C:\Users\Paul\AppData\Local\GitHub\PortableGit_624c8416ee51e205b3f892d1d904e06e6f3c57c8\mingw32\bin\git.exe

Solution 35 - Git

Locating and setting Git Path

  • To Locate git.exe inside your Git-software installation directory.

The location for git.exe will vary depending on what Git-software you have installed! The git.exe file is located inside your Git-software installation directory, usually inside a folder called bin. Some examples of standard locations: Software Standard location Git C:\Program Files (x86)\Git\bin SmartGit C:\Program Files (x86)\SmartGit\git\bin\git.exe GitHub For Windows C:\Users'username'\AppData\Local\GitHub\PortableGit_'numbersandletters'\cmd\git.exe

-Path Setting for Git

Set the git.exe path in the PATH environment variable

Right-click My Computer on your desktop or start-menu, and select Properties. Click the Advanced system settings tab. Click the Environment Variables button. Under System Variables, click PATH (can also be called Path) and click Edit. Paste the location to your git.exe* and ok.

Solution 36 - Git

C:\Users<User Name>\AppData\Local\GitHub\PortableGit_\cmd\git.exe

This is the location that worked for me. I was unable to use git from the shell as well. Setting the above location as the path fixed that issue.

Solution 37 - Git

I am working with GitHub Desktop 1.0.13 and I wanted to add git.exe to my Intellij ennvironment. I have found it in C:\Users\Adam\AppData\Local\GitHubDesktop\app-1.0.13\resources\app\git\mingw64\bin\git.exe

Solution 38 - Git

If you have Visual Studio 2022 installed, git.exe is located here:

C:\Program Files\Microsoft Visual Studio\2022\Professional\Common7\IDE\CommonExtensions\Microsoft\TeamFoundation\Team Explorer\Git\mingw32\bin

Attributions

All content for this solution is sourced from the original question on Stackoverflow.

The content on this page is licensed under the Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) license.

Content TypeOriginal AuthorOriginal Content on Stackoverflow
QuestionAngus MooreView Question on Stackoverflow
Solution 1 - GitS. KirbyView Answer on Stackoverflow
Solution 2 - GitVonCView Answer on Stackoverflow
Solution 3 - GitwjamyersView Answer on Stackoverflow
Solution 4 - GitSterlingDragonView Answer on Stackoverflow
Solution 5 - GitwestonView Answer on Stackoverflow
Solution 6 - GitRandall FlaggView Answer on Stackoverflow
Solution 7 - GitWorkingRobotView Answer on Stackoverflow
Solution 8 - GitPablo JomerView Answer on Stackoverflow
Solution 9 - GitS.NorrbjörkView Answer on Stackoverflow
Solution 10 - Gittrevren11View Answer on Stackoverflow
Solution 11 - GitNull Pointer ExceptionView Answer on Stackoverflow
Solution 12 - GitBinyamin RegevView Answer on Stackoverflow
Solution 13 - GitakshaynagpalView Answer on Stackoverflow
Solution 14 - GitRadek OView Answer on Stackoverflow
Solution 15 - GitNot lovedView Answer on Stackoverflow
Solution 16 - GitSorulView Answer on Stackoverflow
Solution 17 - GitMikeBView Answer on Stackoverflow
Solution 18 - GitolaguView Answer on Stackoverflow
Solution 19 - GitBill SouvasView Answer on Stackoverflow
Solution 20 - GitBrendan ForsterView Answer on Stackoverflow
Solution 21 - GitCrazyCoderView Answer on Stackoverflow
Solution 22 - GitAbdul MajeedView Answer on Stackoverflow
Solution 23 - GitStawmanView Answer on Stackoverflow
Solution 24 - Git2016rshahView Answer on Stackoverflow
Solution 25 - GitNathan TregillusView Answer on Stackoverflow
Solution 26 - GitGauthamView Answer on Stackoverflow
Solution 27 - GitdpantView Answer on Stackoverflow
Solution 28 - GitPrabsView Answer on Stackoverflow
Solution 29 - GitDhanajeyan KathirvelView Answer on Stackoverflow
Solution 30 - GitMinesh KumarView Answer on Stackoverflow
Solution 31 - GitDoogleView Answer on Stackoverflow
Solution 32 - GitJoshView Answer on Stackoverflow
Solution 33 - GitSalman PourmajidiView Answer on Stackoverflow
Solution 34 - GitpaullView Answer on Stackoverflow
Solution 35 - GitM AView Answer on Stackoverflow
Solution 36 - Gitlord AJView Answer on Stackoverflow
Solution 37 - GitAdam AroslanowView Answer on Stackoverflow
Solution 38 - GitRye breadView Answer on Stackoverflow