Skip to main content

Collection of Bash scripts for Git auto-piloting, such as branch, push, pull, and commit.

Project description

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.

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

gitted-0.0.22.tar.gz (11.5 kB view details)

Uploaded Source

Built Distribution

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

gitted-0.0.22-py3-none-any.whl (15.1 kB view details)

Uploaded Python 3

File details

Details for the file gitted-0.0.22.tar.gz.

File metadata

  • Download URL: gitted-0.0.22.tar.gz
  • Upload date:
  • Size: 11.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.0

File hashes

Hashes for gitted-0.0.22.tar.gz
Algorithm Hash digest
SHA256 6313fb1c08ce19bb097a554972e25ebb0c498cd45bbc1a1f2e70ce735648bbc8
MD5 683530a4da5fdb107fa744b46567711c
BLAKE2b-256 9465c6c0925bd20055c7d850d0122af9647e415d0f032ec19bdefee007829362

See more details on using hashes here.

File details

Details for the file gitted-0.0.22-py3-none-any.whl.

File metadata

  • Download URL: gitted-0.0.22-py3-none-any.whl
  • Upload date:
  • Size: 15.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.0

File hashes

Hashes for gitted-0.0.22-py3-none-any.whl
Algorithm Hash digest
SHA256 545346139b05594700d919d56e33bea0c7689698cd94a14a408655616c19d4ec
MD5 1111f7bb0398f16801f280224f88a004
BLAKE2b-256 820a8cd0b09933d29ee09a54a38639789443aa9cdab1a803632fc3dee7176374

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