![](https://crypto4nerd.com/wp-content/uploads/2023/06/1Cgou8t1s80ogxMSG3utV2w.png)
Not every code change is momentous; for a quick fix as a sole contributor or a toy example, GitEase is a simplified way to use Git. Remember the last time you had to look up how to revert your last change, or the difference between fetch and pull? π
What if you could just use commands that make sense, like save
, load
, share
, and undo
? What if AI took on the heavy mental load of writing a commit message? Give GitEase a try.
Read the docs, see the code, install with pip install gitease
.
# Add and Commit all Python files in src with the message "feat: Add new script"
$ ge save -a 'src/*.py' -m 'feat: Add new script'# Add and commit multiple files
$ ge save -a README.md -a gitease/cli.py
# Add and commits everything without prompting for validation
$ ge save -y
# Add, commit and push the README.md file with a generated message
$ ge share -a README.md -y
# Pull recent changes from Git
$ ge load
$ ge undo
Welcome to GitEase
The last git action is: Update README and CLI files
A revert command is: git reset HEAD@{0}
Shell I run the command for you? [y/n]:
Running: git reset HEAD@{0}
Unstaged changes after reset:
M README.md
M gitease/cli.py
Features
GitEase provides a mental wrapper around basic git operations.
ge save
– saves current changes (git add, commit and generate a commit message)ge share
– shares changes to remote by adding, committing, and pushing changes to remotege load
– loads recent updates (git pull)ge undo
– undo the latest Git action using AIge message
– generates a commit message of currently staged files from diff using AI
pip install gitease
(Optional) If you want AI to write your commits for you:
- Get an OpenAI API key and set it up.
- Set environment variable:
export OPENAI_API_KEY_NAME=...
To use GitEase, run the following command within a repo:
$ ge --helpCommands:
--help: Show this message and exit.
save: Add and commit files to git. A commit massage is generated if not provided
share: Add, commit and push changes to remote. A commit massage is generated if not provided
load: Pull recent updates from remote.
undo: Undo last git action - only works using AI
message: Generate commit message from current staged files diff using AI.
Optional params for save and share:
- You can use
-a
to select a specific file, directory or glob pattern - You can use
-m
to provide your own commit message - You can use
-y
to skip user confirmation of the AI message - You can use
-q
command to quiet the AI reasoning
Common sense disclaimer
Using Git can feel like doing your taxes: complicated and time-consuming. But just like doing your taxes, there is probably a good reason to do so. All hell can break loose if youβre audited and miss something important.
When you want the goodness of Git without diving too deep, GitEase is there for you β it simplifies the usage of Git with a more straightforward language for everyday tasks to ease your day.