Examples
Plain conventional commit (no AI):
gg "add dark mode toggle" --type feat --scope ui
Force AI (if key missing → fallback + warning):
gg "refactor data layer" --type refactor --genie
Custom remote same run:
gg "initial commit" --no-branch --remote https://github.com/you/new.git
Open source branch with issue:
gg "fix login bug" --type fix --osc # Prompts for issue number, creates branch: fix/#321-fix-login-bug
Open source branch with Gemini short title:
gg "improve error handling" --type refactor --osc --genie # Prompts for issue number, creates branch: refactor/#456-enhance-error-handling
Troubleshooting
API Key Issues:
- "GEMINI_API_KEY not found" → Run
gg config <key>or export env var. - Corrupted config file → Delete
~/.gitgenie/config.jsonand re-rungg config <key>. - Invalid/empty encrypted key format → Re-configure with
gg config <key>.
Git Issues:
- "No changes detected to commit" → Ensure edits; check
git status; verify .gitignore. - Push retries failing → validate remote URL & auth; run manual:
git push origin <branch>. - Merge conflicts (during
--push-to-main): resolve manually, then commit & push main. - Branch already exists (creating) → choose a different name or delete existing branch.
Staging Issues:
- Files not staged → Check .gitignore rules; manually stage with
git add <files>. - Large files causing issues → Use .gitignore or Git LFS for binary/large files.