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条回答
Emotional °昔
2楼-- · 2019-01-02 22:36

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
查看更多
Anthone
3楼-- · 2019-01-02 22:38

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.

查看更多
Lonely孤独者°
4楼-- · 2019-01-02 22:39

type in the command line:

where git.exe
查看更多
甜甜的少女心
5楼-- · 2019-01-02 22:39

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
查看更多
ら.Afraid
6楼-- · 2019-01-02 22:39

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

查看更多
我欲成王,谁敢阻挡
7楼-- · 2019-01-02 22:41

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.

查看更多
登录 后发表回答