Is it possible to read directly from git repository using python? I tried using git-python but it reads from local git repository only.
The only git-python command which may let you query commits without cloning/fetching first would be ls_remote.
You can see an example in test/lib/helper.py#L168-179:
rw_repo.git.ls_remote(d_remote)
But that will return only the commits representing the branches/HEADS of a remote repo.
For any other history, you need to clone that remote repo first.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With