Skip to main content

Command-Line Shortcuts for a Primitive Git Flow

DevOps By Rultor.com

make PyPI - Version PDD status codecov Hits-of-Code License

If all you need to do with Git is make branches, push, and sync, this collection of command-line commands may simplify your workflow. Well, it simplifies mine, a hundred times per day.

First, install Python3, Git, pip, gh, and Bash.

Then, install this Python package (with Bash scripts inside):

pip install gitted==0.0.21

Then, in order to make a contribution to a GitHub repo, assuming you've made a fork already and cloned it (in the command line):

First, start a branch to resolve issue no. 42 (for example):

branch 42

Then, write some code and add+commit it (no push):

commit 'Just fixed a small bug'

Then, pull recent changes from the master of the upstream:

pull

Finally, write more code and add+commit+push it:

push 'Just fixed a big bug'

If you omit the commit message for the commit or the push command, they will use ChatGPT to generate it, looking at the changes you've made. To make it work, define the OPENAI_API_KEY environment variable with the OpenAI key.

To use a different model, set GITTED_MODEL to its identifier; it defaults to gpt-3.5-turbo. To point at a different OpenAI-compatible endpoint (for example a local LLM such as Ollama or llama.cpp with the OpenAI shim, or any other proxy), set OPENAI_BASE_URL to the endpoint's URL; the openai Python client picks it up automatically.

Conventions

In order to work smoothly, you must respect a few conventions:

  • Branch names are always integers, equal to GitHub issue numbers (why?)
  • All commits are GPG-signed, if you have a key (how?)
  • The origin is the fork, while the upstream is the main repo (why?)

Perhaps in future versions we'll make these configurable. However, at the moment, that's what we have.

How to Contribute

Install GNU make and uv. Then, run:

make

Should build. If it doesn't, submit a bug report.

Metadata

Release files for gitted 0.0.23

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for gitted 0.0.23
File Size Uploaded
gitted-0.0.23.tar.gz 11.5 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for gitted 0.0.23
File Interpreter ABI Platform
gitted-0.0.23-py3-none-any.whl Python 3 none any Details

Total release size: 26.5 kB

Release files / gitted-0.0.23.tar.gz

Download URL gitted-0.0.23.tar.gz
Size 11.5 kB
Tags Source
SHA-256 checksum
How to use checksums
b72c0b6ea8b7c0e5ab1cf5db52431cbc98e8ddc49a8843680db8e5ee382492c3
BLAKE2b-256 checksum
How to use checksums
cb71e48c8262c432cf6feb8e15d83f056389a7614f5e60f3d80e7e73dc052ab3
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.12.0

Release files / gitted-0.0.23-py3-none-any.whl

Download URL gitted-0.0.23-py3-none-any.whl
Size 15.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
a402960a9372650dbddaf399e2eba46ff5ac8ff41fbf027eadddc7299dfa4c7b
BLAKE2b-256 checksum
How to use checksums
209fd1a56b1818a9414e782d606c0a8883e40a58239ed91a84a95093caba38b7
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.12.0

Release history Release notifications | RSS feed

This release

0.0.23 This release

2 release files

0.0.22

2 release files

0.0.21

2 release files

0.0.20

2 release files

0.0.19

2 release files

0.0.18

2 release files

0.0.16

2 release files

0.0.15

2 release files

0.0.13

2 release files

0.0.12

2 release files

0.0.11

2 release files

0.0.10

2 release files

0.0.8

2 release files

0.0.7

2 release files

0.0.6

2 release files

0.0.5

2 release files

0.0.4

2 release files

0.0.3

2 release files

0.0.2

2 release files

0.0.1

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page