githelp - a tiny git helper (gg/ggi): commit without quotes, and add .gitignore templates from github/gitignore
Project description
githelp
A tiny git helper published as githelp. It
installs two commands: gg and ggi.
pip install githelp
- Repository: https://github.com/rosaboyle/githelp
- PyPI: https://pypi.org/project/githelp/
gg — commit without quotes
Type your message straight after gg, no quotes:
gg fix the login bug and update the readme
That runs, in order:
git add .
git commit -m "fix the login bug and update the readme"
git push
It warns you and asks "are you sure?" before committing when:
- more than 100 files are staged, or
- more than 100,000 changed lines are staged.
If you decline, it aborts (your files stay staged). If neither threshold is
crossed, it just commits and pushes. If the current branch has no upstream, it
pushes with --set-upstream origin <branch> automatically.
gg --help # usage
ggi — add a .gitignore template
Templates are fetched live from
github/gitignore through the GitHub API,
so they are always the current upstream versions (nothing is bundled or stale).
ggi # interactive: type to fuzzy-search the full list, then pick one
ggi Python # add a named template directly
ggi --help # usage
The selected template is appended to your repository's .gitignore inside a
clearly marked block, so it is easy to find and is never added twice.
Tip: set
GITHUB_TOKEN(orGH_TOKEN) in your environment to avoid GitHub's unauthenticated API rate limit.
Install from source / develop
git clone https://github.com/rosaboyle/githelp
cd githelp
pip install -e .
Dependencies
Pinned to the latest releases:
| Package | Version |
|---|---|
| httpx | 0.28.1 |
| questionary | 2.1.1 |
| rich | 15.0.0 |
Requires Python 3.9+.
Publishing
A helper script is provided: publish.sh.
./publish.sh # build + upload to PyPI
./publish.sh --test # upload to TestPyPI instead
./publish.sh --check # build only, validate with twine, do not upload
Manual equivalent:
python -m pip install --upgrade build twine
python -m build
twine check dist/*
twine upload dist/*
Authenticate to PyPI with an API token: create one at
https://pypi.org/manage/account/token/ and either set TWINE_USERNAME=__token__
and TWINE_PASSWORD=<your-token>, or let twine prompt you.
License
MIT — see 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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file githelp-0.1.0.tar.gz.
File metadata
- Download URL: githelp-0.1.0.tar.gz
- Upload date:
- Size: 7.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.4
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
eace0e7e2a53107b2270bd76125e7df8d4b06200830ea92cb21a4c4d2953bfa6
|
|
| MD5 |
2301db4d51391a879e9b9b3bec4a04c5
|
|
| BLAKE2b-256 |
069c84f7441d4fc873d55d988b909fd44af97f1c465b65da65f96d90c365f0b0
|
File details
Details for the file githelp-0.1.0-py3-none-any.whl.
File metadata
- Download URL: githelp-0.1.0-py3-none-any.whl
- Upload date:
- Size: 7.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.4
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b7b77dcd6152a14c4f3454ff710d3dbf68a5fc98e301bd1126da17216a26d991
|
|
| MD5 |
2ca068f024c5a0cf63f273c86b4b57d1
|
|
| BLAKE2b-256 |
5bf6bae929af2cda7c42fcacd6f921a17a00b6d700bb2597e40cd16831408655
|