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.0.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.0-py3-none-any.whl (8.3 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for fastgit-0.1.0.tar.gz
Algorithm Hash digest
SHA256 a4c997cdd07f64ba5fc81ffceb56dd1b1310a707d0b9c0c01040056c49232cfe
MD5 87b7359eb450cac28c4c5a0a066366d4
BLAKE2b-256 b474ed1978d21922f21a63ed08717bd9f8f7037cf354d10e45965c1286c75d7c

See more details on using hashes here.

File details

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

File metadata

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

File hashes

Hashes for fastgit-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 7574af8a240b0b976f5e4802cac997baae6cf6ef2261e71b6cede46029e3169a
MD5 cdffed0254c40988264ab4ee622057a7
BLAKE2b-256 cc548cf733a2466fe923c3f4cefabd4f912364c7b0b0e694e5520e4087a1acc6

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