Skip to content

Custom Git commands and Bash scripts to streamline key operations—with a little help from ChatGPT

License

yegor256/gitted

Repository files navigation

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

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.

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.

About

Custom Git commands and Bash scripts to streamline key operations—with a little help from ChatGPT

Topics

Resources

License

Stars

Watchers

Forks

Contributors 6