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.0.tar.gz
(2.9 kB
view hashes)
Built Distribution
Close
Hashes for gitcmd-1.1.0-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | a6fba991cc4e5f28064b249d05948e7f38602c5fe807943182d3ff176d60b636 |
|
MD5 | 346111e76d823e712c0aa92fe5161349 |
|
BLAKE2b-256 | 1bfa6e82b80628edcfa65d934bf10622925763871940d967845f24e685f5347f |