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
$ 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.

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.10.tar.gz (7.0 kB view details)

Uploaded Source

Built Distribution

gscp-1.0.10-py3-none-any.whl (9.2 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: gscp-1.0.10.tar.gz
  • Upload date:
  • Size: 7.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.0.0 CPython/3.12.4

File hashes

Hashes for gscp-1.0.10.tar.gz
Algorithm Hash digest
SHA256 137bfbdb64002c88579aa7eae7973f0d92c4ea5712b87f7dd12d2081c765cbeb
MD5 f5b441c50cc619aabd3d49aa3cc30fe7
BLAKE2b-256 241a5346e02a79cf83c25c442923a3b833820d9b58d8ee11aeddbcb7409668f7

See more details on using hashes here.

File details

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

File metadata

  • Download URL: gscp-1.0.10-py3-none-any.whl
  • Upload date:
  • Size: 9.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.0.0 CPython/3.12.4

File hashes

Hashes for gscp-1.0.10-py3-none-any.whl
Algorithm Hash digest
SHA256 8d9aaae6cae91a904e47e1d2619b07824f84eacd9fa34738f90d58458da3ee3e
MD5 47376801d3cc5b2b8f88217d6decb4cf
BLAKE2b-256 916993db7df41daa4da24a0db68588f6f7081fb119b6766ff07d4ea9710fe492

See more details on using hashes here.

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