Reputation: 10073
I have github git 2.14.1 installed on Windows 10 from this URL: https://git-scm.com/download/win
How do I get access to the git command such that I can invoke it from the cmd or powershell commandline?
What I really want to do is invoke it from Python using subprocess.Popen('somepath/git log --follow' ...)
, but I figure if I can run it from the commandline then I can do that in Python.
Previously I was able to follow these instructions on my windows 7 machine with an older version of git: Where is git.exe located?
In short, I am looking here:
C:\Users\<username>\AppData\Local\GitHub\PortableGit_<numbersandletters>\cmd\git.exe
and the git.exe file does not exist.
So I think either something changed in github install or on Windows 10.
Upvotes: 1
Views: 64
Reputation: 229344
With the default setup, git should just be in your PATH, so you can just open a cmd.exe window(or find git bash on your start menu for a better experience) and run git without using any full path to git.exe file.
From python you can then just run subprocess.Popen('git log ... '
If you do need the full path, Git for Windows installs git.exe by default at C:\Program Files\Git\bin
Upvotes: 1