Where is git.exe located?

2019-01-02 22:12发布

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?

30条回答
Lonely孤独者°
2楼-- · 2019-01-02 22:20

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
查看更多
不美不萌又怎样
3楼-- · 2019-01-02 22:22

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.

查看更多
Deceive 欺骗
4楼-- · 2019-01-02 22:24

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

查看更多
干净又极端
5楼-- · 2019-01-02 22:26

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.

查看更多
干净又极端
6楼-- · 2019-01-02 22:26

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.

查看更多
7楼-- · 2019-01-02 22:30

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

查看更多
登录 后发表回答