This is a Gemini CLI extension that provides convenient Git commands to streamline your development workflow.
Note
This is a fork of ox01024/gemini-cli-git.
- AI-powered commit messages: Leverages Gemini's capabilities to generate conventional commit messages based on your staged changes.
- Streamlined branching: Quickly commit your changes to a new branch.
- Integrated with Gemini CLI: Seamlessly integrates into the Gemini CLI environment.
This extension provides the following commands:
/git:review: Review staged changes./git:commit: Analyzes your staged Git changes and generates a descriptive commit message following the Conventional Commits specification./git:commit-push-pr: Commit changes, push to remote, and create a Pull Request (GitHub/GitLab)./git:clean-gone: Clean up local branches that have been deleted on the remote./git:release-notes: Generate release notes from the last 50 commits./git:stash: Stash changes with an auto-generated descriptive message./git:summary: Summarize your git activity from the last 48 hours for standups./git:ignore: Suggest and apply patterns to your.gitignorefile./git:changelog: Generate a professional "Keep a Changelog" formatted changelog.
Here is a recommended development workflow using these commands:
flowchart TD
Start([Start Task]) --> Dev[Development / Code Changes]
Dev --> Stage[Stage Changes]
Stage --> Review{"/git:review"}
Review -- Issues Found --> Fix[Fix & Re-stage]
Fix --> Stage
Review -- Approved --> BranchType{New Branch?}
BranchType -- Yes --> CPP["/git:commit-push-pr"]
BranchType -- No --> Commit["/git:commit"]
CPP --> PR[PR / CI / Review Loop]
Commit --> PR
PR -- Merged --> Release["/git:changelog & /git:release-notes"]
Release --> Clean["/git:clean-gone"]
Clean --> End([End Task])
subgraph Utilities
direction LR
U1["/git:summary"]
U2["/git:stash"]
U3["/git:ignore"]
end
To fully utilize the automation features (specifically /git:commit-push-pr), ensure you have the CLI tool corresponding to your platform installed and authenticated:
- GitHub: GitHub CLI (
gh) - GitLab: GitLab CLI (
glab)
Install the Git extension by running the following command from your terminal (requires Gemini CLI):
gemini extensions install https://github.com/joychetry/git-commands-gemini-cliFor auto update:
gemini extensions install https://github.com/joychetry/git-commands-gemini-cli --auto-updateYou can invoke the commands directly from the Gemini CLI prompt:
Code Review & Commit
/git:review: Review staged changes for quality and bugs./git:commit: Generate a conventional commit message for staged changes./git:commit-push-pr: Commit, push, and create a PR/MR (GitHub/GitLab).
Project Management
/git:summary: Summarize your recent git activity for standups./git:release-notes: Generate professional release notes from recent history./git:changelog: Generate a "Keep a Changelog" section for new updates.
Maintenance
/git:stash: Stash changes with an AI-generated descriptive message./git:ignore: Suggest and apply updates to your.gitignore./git:clean-gone: Remove local branches that were deleted on remote.
- feat(git): add new utility commands - enhances developer productivity and workflow automation (041dc64)
- docs: update readme with fork attribution - improves project transparency (371a1c4)
- first commit (befda35)
- License: Apache License 2.0