Skip to main content

Run git terminal commands from python scripts

Project description

Pygit

Here is an example that shows how you can run git commands:-

#example code
import pygitcli
git = pygitcli.Git()
git.init()
git.add()
git.commit('commit message)
git.push()

Pygit intelligently detects if this project is already configured with a github repository, If it finds the repository , it automatically adds them to the Git class.


If you want to override the arguments of the Git class , pass the url , branch to the class in the following way:-

#override the args of Git
import pygitcli
git = pygitcli.Git('repo url' , 'branch name')
git.init()
git.add()
git.commit('Changed URL , branch fetching logic')
git.push()

Change Log

0.0.1 (13/12/2020)

  • First Release

0.0.4 (13/12/2020)

  • Changed Documentation

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

Pygitcli-0.0.5.tar.gz (3.7 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