Skip to main content

fastgit

Usage

Installation

Install latest from pypi

$ pip install fastgit

How to use

In this example we run git init on a directory, add a .gitignore, and commit it.

import shutil, tempfile
def _git_init(g):
    if g.exists: return # Return early if git already initialised
    g.init(b='main')
    g.config('user.name', 'fastgit')
    g.config('user.email', 'fastgit@example.com')
    (g.d/".gitignore").mk_write("*.bak")
    g.add(".gitignore")
    g.commit(m="add .gitignore")
td = tempfile.mkdtemp()
g = Git(td)
_git_init(g)
assert 'add .gitignore' in g.last_commit
print(g.branch('--show-current'))
main

You can also pass path arguments after -- using the __ parameter:

g.log('--oneline', __=['.gitignore'])
'22a9a5d add .gitignore'
shutil.rmtree(td)

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

fastgit-0.1.1.tar.gz (7.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

fastgit-0.1.1-py3-none-any.whl (8.3 kB view details)

Uploaded Python 3

File details

Details for the file fastgit-0.1.1.tar.gz.

File metadata

  • Download URL: fastgit-0.1.1.tar.gz
  • Upload date:
  • Size: 7.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/7.0.0 CPython/3.13.2

File hashes

Hashes for fastgit-0.1.1.tar.gz
Algorithm Hash digest
SHA256 cfd7f530c90698a9007266fc97cf3eea7950b2118e611ef6089618d655b20e9e
MD5 9d73d414cc7a54ce98bdf0ee6bd4f37c
BLAKE2b-256 60fca54df04086d5b953bbd4d5814bb88cb58d51234f8cd46c32ec8bcb6cb7b3

See more details on using hashes here.

File details

Details for the file fastgit-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: fastgit-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 8.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/7.0.0 CPython/3.13.2

File hashes

Hashes for fastgit-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 fac4f92b360ade1530d2efb1e0a4f44f52e0bcd63021bdf269c2daca92c029f3
MD5 d3017807b80a2a6dad7e18625bd53cc3
BLAKE2b-256 879f49b450ca83e888d701a1605fdf731bfbb8d1a0de7dc03ad841dc597995d3

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page