Gitpybinding
1.0.0
Comando totalmente BIT vinculante para Python, compatible con toda la versión GIT y Python 2 y 3.
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.
""" Ahora puede ejecutar cualquier comando git como git.init() , git.clone("gitrepo destination") , git.commit() , git.push() , git.config() etc.
El comando git con "-" se puede reemplazar con "_" como git rev-starse a git.rev_parse ()
También puede poner el argumento del comando Git en Args de funciones separadas como git.clone("gitrepo","destination") .
Cuando git.clone () terminó sin error, la ruta se moverá automáticamente al destino de clones.
Para cambiar la ubicación binaria Git, use:
git.gitbin = "path/to/git/binary"