Gitpybinding
1.0.0
Comando totalmente Git Ligação para Python, compatível com toda a versão Git e Python 2 e 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.
""" Agora você pode executar qualquer comando git como git.init() , git.clone("gitrepo destination") , git.commit() , git.push() , git.config() etc.
O comando git com "-" pode ser substituído por "_" como o git rev-parse para git.rev_parse ()
Você também pode colocar o argumento do comando git em funções separadas args como git.clone("gitrepo","destination") .
Quando o git.Clone () terminou sem erro, o caminho será movido automático para o destino do clone.
Para alterar o local binário Git, use:
git.gitbin = "path/to/git/binary"