Skip to content

A proxy of git commands, manage gitlab or git repository easily

Notifications You must be signed in to change notification settings

MrNobody2046/gitcmd

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

40 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

gitcmd

PyPI Version PyPI Monthly downloads Build Status Wheel Status Coverage report

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"
gitcmd = 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
gitcmd = GitCmd(work_dir="clone_to_where", url="", user="user",pwd="pwd")

# work dir should be either empty or not exists
gitcmd.clone()


# after repository was cloned to local , you can execute other commands
gitcmd.checkout()
gitcmd.pull()
gitcmd.execute("git diff ...")

About

A proxy of git commands, manage gitlab or git repository easily

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages