a wrapper of git command
Project description
gitcmd
Overview
gitcmd is a wrapper of ‘git’ command , it can interact with git command where need username and password.
Installation
The quick way:
pip install gitcmd
Usage
Clone git respositroy
from gitcmd import GitCmd clone_to = 'mydir' url = "https://github.com/philoprove/gitcmd.git" ge = GitCmd(work_dir=clone_to, url=url)
if you clone with ssh, you may need config ssh key at first.
Clone gitlab with username,password
from gitcmd import GitCmd import os ge = GitCmd(work_dir="clone_to_where", url="", user="user",pwd="pwd") # work dir should be either empty or not exists ge.clone() # after repository was cloned to local , you can execute other commands ge.checkout() ge.pull() ge.execute("git diff ...")
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
gitcmd-1.1.1.tar.gz
(3.5 kB
view hashes)
Built Distribution
Close
Hashes for gitcmd-1.1.1-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 828d6582f823e439807389ed37d6fea284b3c15d5bba370f46702d4df4275b58 |
|
MD5 | 24642c99b91314da61a18be0b3a36d2e |
|
BLAKE2b-256 | 66d58548543c14e4e85bc394fe1de6d691de8c57b23a9d15f0bf85a7b2a6358c |