Skip to content

Simple utility for getting the current git commit hash (HEAD)

License

Notifications You must be signed in to change notification settings

Zaczero/githead

Repository files navigation

githead

PyPI - Python Version Liberapay Patrons GitHub Sponsors

Simple utility for getting the current git commit hash.

Installation

The recommended installation method is through the PyPI package manager. The project is implemented in Rust and several pre-built binary wheels are available for Linux, macOS, and Windows, with support for both x64 and ARM architectures.

pip install githead

Basic usage

from githead import githead

githead() # -> 'bca663418428d603eea8243d08a5ded19eb19a34'

# defaults to '.git' directory but can be changed:
githead('path/to/.git')

About

Simple utility for getting the current git commit hash (HEAD)

Topics

Resources

License

Stars

Watchers

Forks