Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

git status with python

Tags:

git

python

module

I want to check if there are uncommited changes, or if there are unpushed commits in a git repository with python.

I could use subprocess, but a library would be better.

On pypi are several libraries with different quality. At the moment I don't know which one to choose.

like image 332
guettli Avatar asked Oct 03 '22 21:10

guettli


1 Answers

I would recommend GitPython which is full featured, very well documented and easy to use IMO. For more info, check out this answer

like image 86
Daniel Perez Avatar answered Oct 07 '22 19:10

Daniel Perez