1

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.

0

1 Answer 1

1

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

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.