Here I was looking around write some code through which I can maintain my git repository.
I am python beginners level but i know it. My repository on git hub is.
https://github.com/gtrdotmcs/NewDjango/
I would really like to clone,pull,commit and push my repository using python code.
Yeah it not easy for beginners but I would really like to do it.
Coming around i came with some python libraries for github.
PyGithub
and GitPython
I would also like to know which is better one?
PyGithub is a library for interacting with the GitHub API; it will not let you clone your repository or otherwise interact with a local git repository.
GitPython is a Python interface to git
and can be used to clone a remote repository. In fact, there's an example of exactly that at the beginning of the tutorial to which you have linked.
That said, it's not clear from your question exactly what you hope to accomplish -- learning the git
commandline interface is an important skill if you're going to be working with GitHub (or git
in general). While you can probably perform many of the same tasks with GitPython
, you are arguably going to be spending much of your time duplicating the existing functionality of the commandline tools.