Skip to main content

A tool to quickly commit your work with git.

Project description

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
$ gc
$ gp

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!

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.

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

gscp-1.0.0.tar.gz (4.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

gscp-1.0.0-py3-none-any.whl (6.1 kB view details)

Uploaded Python 3

File details

Details for the file gscp-1.0.0.tar.gz.

File metadata

  • Download URL: gscp-1.0.0.tar.gz
  • Upload date:
  • Size: 4.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.11.2

File hashes

Hashes for gscp-1.0.0.tar.gz
Algorithm Hash digest
SHA256 4bd46ccfc87455569711f874434ce341cf7c087cd84e4bd135a3d81899add64c
MD5 3bbf82701ea6784d41a555774a8263cd
BLAKE2b-256 5d3424211a767d85faabafbdd1fcdd7abaef9ba55aa9d9b587e181a9e2bfc220

See more details on using hashes here.

File details

Details for the file gscp-1.0.0-py3-none-any.whl.

File metadata

  • Download URL: gscp-1.0.0-py3-none-any.whl
  • Upload date:
  • Size: 6.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.11.2

File hashes

Hashes for gscp-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 570851d01cbf34afa89ce7775c67779806e5487be5e15478e3d1afb0443afc66
MD5 647bf91e3874d918efe5249194f8c877
BLAKE2b-256 eac5c7f0813a9fbc9aa4f0449a32e5f2fb5b998afbaf32a62317e072a0380b64

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page