Skip to main content

A tool to generate a Git commit with a specific hash part.

Project description

hashcommit

A tool to generate a Git commit with a specific hash prefix.

Installation

You can install the package using pip:

pip install hashcommit

Usage

By default, hashcommit will use the files that are staged (added using git add) to create a commit with a specific hash prefix. If no files are staged, it will create an empty commit.

To create a new commit with a specific hash prefix:

hashcommit --hash <desired_hash_part> --message "<commit_message>"

To overwrite the current commit with a specific hash prefix:

hashcommit --hash <desired_hash_part> --message "<commit_message>" --overwrite

You can also specify if the hash must begin with, contain, or end with the desired string using the --match-type option. The default is to match the beginning of the hash:

hashcommit --hash <desired_hash_part> --message "<commit_message>" --match-type <begin|contain|end>

Development

To develop or contribute to this project, clone the repository and install the dependencies:

git clone https://github.com/wozniakpl/hashcommit.git
cd hashcommit
pip install -e .

License

This project is licensed under the MIT License.

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

hashcommit-0.1.0.tar.gz (3.8 kB view hashes)

Uploaded Source

Built Distribution

hashcommit-0.1.0-py3-none-any.whl (4.4 kB view hashes)

Uploaded Python 3

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