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?
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?
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.
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
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.
Here are step by step instructions for you to find out:
Ctrl - Shift - Esc
of open Task Manager.GitHub
, and select "Open file location".
There you go!
You can do this with any application, not just GitHub.
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.exe
on all systems.
type in the command line:
where git.exe
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
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
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
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.
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.
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
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.
In windows 8 I found its path as below:
C:\Program Files (x86)\Git\bin\git.exe
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
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
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
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
.
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.
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!
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
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:
git status
Agreeing to the Xcode/iOS license requires admin privileges, please re-run as root via sudo.
sudo git status
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.
Using
git.exe location:
C:\Users\<.username>\AppData\Local\Programs\Git\cmd\git.exe
Suggestion: while Installing, copy the git path
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
Try looking in C:\Program Files\Git\bin
. I have been able to use git.exe
located there to setup my repository with PyCharm.
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
I have downloaded stub from https://desktop.github.com 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.
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
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
For me on Windows 10: C:\Users\Paul\AppData\Local\GitHub\PortableGit_624c8416ee51e205b3f892d1d904e06e6f3c57c8\mingw32\bin\git.exe
Locating and setting Git Path
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.
C:\Users\\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.
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