Gitpybinding
1.0.0
Vollgit -Befehlsbindung für Python, kompatibel mit allen Git- und Python 2 & 3 -Version.
pip install gitbinding
from gitbinding import Git
git = Git ( path = None , direct_output = True )
"""
path:
working directory, None = use current directory.
direct_output:
if direct_output set to False, the output is redirect to command/function return.
""" Jetzt können Sie jeden Git -Befehl wie git.init() , git.clone("gitrepo destination") , git.commit() , git.push() , git.config() usw. ausführen.
Git-Befehl mit "-" kann durch "_" wie Git rev-parse zu git.rev_parse () ersetzt werden.
Sie können auch Git -Befehlsargument in separate Funktionsargs wie git.clone("gitrepo","destination") einfügen.
Wenn Git.clone () ohne Fehler beendet ist, wechselt der Pfad automatisch zum Klonziel.
Um den Binärort zu ändern, verwenden Sie:
git.gitbin = "path/to/git/binary"