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

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

其他回答

如果你可以使用git命令,它应该在你的路径? 因此,这应该工作假设Linux或Linux类似的操作系统

which git

其他也假设Linux类似的操作系统

cd /
find . -name "*git*"

如果在windows上,告诉我你用的是什么版本,我会帮助你。windows默认路径为 C:\Program Files (x86)\Git.

可执行文件的名称不是git。Exeon所有系统。

我在

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

Windows 10操作系统:

我从- https://git-for-windows.github.io/安装git。

安装后,我在C:\Program Files\Git\bin\git.exe找到了它

当地C:\Users\ \ AppData \ \ GitHub \ PortableGit_ \ cmd \ git.exe

这个地点对我来说很合适。我也无法使用shell中的git。将上面的位置设置为路径解决了这个问题。

有时可能在:C:\Users\user-name\AppData\Local\Programs\Git\cmd.检查PATH环境变量USER和SYSTEM可以得到这些信息。