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 ...")
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 details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file gitcmd-1.1.1.tar.gz.
File metadata
- Download URL: gitcmd-1.1.1.tar.gz
- Upload date:
- Size: 3.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
0e1bd80e12c93c2c1cd1647647524ae20a4596340f34138ea6b0a61545a99dd3
|
|
| MD5 |
c8d6ef94a73a43c9cae3526c2322eba2
|
|
| BLAKE2b-256 |
3edffb63e2beb6fe4e5ccdc42eac0cf063f81a282eb02d7506fd346ea413b1b0
|
File details
Details for the file gitcmd-1.1.1-py2.py3-none-any.whl.
File metadata
- Download URL: gitcmd-1.1.1-py2.py3-none-any.whl
- Upload date:
- Size: 4.9 kB
- Tags: Python 2, Python 3
- Uploaded using Trusted Publishing? No
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
828d6582f823e439807389ed37d6fea284b3c15d5bba370f46702d4df4275b58
|
|
| MD5 |
24642c99b91314da61a18be0b3a36d2e
|
|
| BLAKE2b-256 |
66d58548543c14e4e85bc394fe1de6d691de8c57b23a9d15f0bf85a7b2a6358c
|