Skip to main content

python binding git command.

Project description

Fully git command binding for python, compatible with all git and python 2 & 3 version.

Installation

pip3 install gitbinding

Usage

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.
"""

now you can run any git command like git.init(), git.clone("gitrepo destination"), git.commit(), git.push(),git.config() etc.

git command with "-" can be replaced with "_" like git rev-parse to git.rev_parse()

you can also put git command argument in separate function args like git.clone("gitrepo","destination").

when git.clone() finished without error, the path will automatic move to clone destination.

change git bin

to change git binary location, use:

git.gitbin = "path/to/git/binary"

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

gitbinding-1.0.5.tar.gz (2.8 kB view hashes)

Uploaded Source

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page