gscp: Git, Stage all, Commit, Push
I often find myself writing a bunch of code and wanting to commit it all, in one singular command. It's not very hard:
$ git add -u
$ git commit -v
$ git push
However, this is two commands two long. This should be in a singular command! This is why I once
had a gscp script in $PATH that did pretty much that. However, I wanted to add features over time:
- The ability to specify a commit message (sometimes)
- The ability to force push
- The ability to create amend commits
- And maybe more
It would have been easy enough to have those features in my shell script, but parsing the flags in shell seemed harder than it needs to be. Therefore, I created a python package. Yay python!
Installation
> pip install gscp
Requirements
This is a rather simple script. It requires python 3.7 or higher. Because it uses git, you
obviously need to have git in path. It relies on the pty module. If the pty module is
limited in some OSes, those limits apply here. All the other requirements are in pyproject.toml.
Building / Running
This project is built with poetry.
Usage:
usage: gscp [-h] [-a] [-f] [message]
positional arguments:
message Commit message to use. If no message specified, it falls back to git's default behaviour with verbose mode
options:
-h, --help show this help message and exit
-a, --amend If we using git amend mode (warning, this triggers a force push)
-f, --force If we use `git push --force`
Disclaimer
Use at your own risk. This can force push stuff, after all.
Metadata
Release files for gscp 1.0.10
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| gscp-1.0.10.tar.gz | 7.0 kB | Without provenance | Details for gscp-1.0.10.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| gscp-1.0.10-py3-none-any.whl | Python 3 | none | any | Details for gscp-1.0.10-py3-none-any.whl |
Total release size: 16.2 kB
Release files / gscp-1.0.10.tar.gz
| Download URL | gscp-1.0.10.tar.gz |
|---|---|
| Size | 7.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
137bfbdb64002c88579aa7eae7973f0d92c4ea5712b87f7dd12d2081c765cbeb
|
|
BLAKE2b-256 checksum How to use checksums |
241a5346e02a79cf83c25c442923a3b833820d9b58d8ee11aeddbcb7409668f7
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.0.0 CPython/3.12.4
|
Release files / gscp-1.0.10-py3-none-any.whl
| Download URL | gscp-1.0.10-py3-none-any.whl |
|---|---|
| Size | 9.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
8d9aaae6cae91a904e47e1d2619b07824f84eacd9fa34738f90d58458da3ee3e
|
|
BLAKE2b-256 checksum How to use checksums |
916993db7df41daa4da24a0db68588f6f7081fb119b6766ff07d4ea9710fe492
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.0.0 CPython/3.12.4
|
Security for gscp 1.0.10
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.