https://github.com/zaczero/githead
Simple utility for getting the current git commit hash (HEAD)
https://github.com/zaczero/githead
commit git git-commit hash
Last synced: about 2 months ago
JSON representation
Simple utility for getting the current git commit hash (HEAD)
- Host: GitHub
- URL: https://github.com/zaczero/githead
- Owner: Zaczero
- License: 0bsd
- Created: 2024-09-23T20:35:29.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2025-02-04T15:36:52.000Z (11 months ago)
- Last Synced: 2025-02-13T16:47:22.199Z (11 months ago)
- Topics: commit, git, git-commit, hash
- Language: Python
- Homepage: https://pypi.org/p/githead
- Size: 39.1 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# githead
[](https://pypi.org/project/githead)
[](https://liberapay.com/Zaczero/)
[](https://github.com/sponsors/Zaczero)
Simple utility for getting the current git commit hash (HEAD).
## Installation
```sh
pip install githead
```
## Basic usage
```py
from githead import githead
githead() # -> 'bca663418428d603eea8243d08a5ded19eb19a34'
# defaults to '.git' directory but can be changed:
githead('path/to/.git')
```