我有PyCharm,我正在寻找git.exe来设置它与我的repo。

git.exe的路径是什么?


当前回答

检查这个路径:

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

其他回答

如果你安装了Visual Studio 2022, git.exe位于这里:

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

Windows 10上的C:\Users\Paul\AppData\Local\GitHub\PortableGit_624c8416ee51e205b3f892d1d904e06e6f3c57c8\mingw32\bin\git.exe

我很惊讶地看到没有人提到使用——execc -path开关。

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

我希望这能帮助到一些人。

如果你正在使用GitHub for Windows, git.exe可能不在你的PATH中,但你可能会在以下位置找到它:C:\Users\<username>\AppData\Local\GitHub\PortableGit_<numbersandletters>\bin\git.exe

这就是我的情况,在Windows 7 +版本1.0的GitHub Windows。

在Windows 10中,它出现在:

当地C:\Users\ <用户名> \ AppData \ \ GitHub \ PortableGit_ < numbersandletters > \ cmd \ git.exe

(\cmd vs \bin)

来自GitHub Desktop 1.1

UI不同了,Git路径现在在:

C: \ \用户用户< > \ AppData \ Local GitHubDesktop app - < appversion > \资源app \ git \ cmd . exe git。

PS: AppData默认是一个隐藏文件夹。

如果你安装了msysgit,在64位系统上的路径看起来像c:\Program Files (x86)\Git\bin\git.exe,否则就下载并安装它,PyCharm不附带Git客户端。