AI Features
Understand how GitGuru uses artificial intelligence to enhance your Git workflow.
Overview
GitGuru leverages Google's Gemini AI to provide intelligent Git assistance. The AI understands natural language, analyzes your repository context, and provides safe, actionable suggestions.
Natural Language Processing
GitGuru's AI can understand Git questions in plain English. You don't need to know exact command syntax - just describe what you want to do:
gg ask "how do I undo my last commit?"
gg ask "create a new branch for login feature"
gg ask "see what changed in the last 5 commits"How It Works
- Intent Recognition: The AI analyzes your question to understand what you're trying to achieve
- Context Analysis: GitGuru examines your current repository state
- Command Generation: The AI suggests the most appropriate Git command
- Safety Evaluation: Each suggestion is rated for safety (Safe, Caution, Dangerous)
- Explanation: You receive a clear explanation of what the command does
AI-Generated Commit Messages
One of GitGuru's most powerful features is automatic commit message generation. The AI analyzes your staged changes to create meaningful, conventional commit messages:
gg commit --aiWhat the AI Analyzes
- File Changes: Which files were modified, added, or deleted
- Diff Content: The actual code changes in each file
- Change Patterns: Whether changes are features, fixes, refactors, etc.
- Project Context: File types, directory structure, and naming patterns
Safety Analysis
Every AI suggestion includes a safety rating to help you understand the risk level:
Safe Operations
Read-only commands that don't modify your repository. No risk of data loss.
Caution Required
Commands that modify your working directory but can be reversed or recovered from.
Dangerous Operations
Commands that can permanently delete data or rewrite history. Requires extra caution.
Interactive Learning
Use gg explain to learn Git concepts interactively:
gg explain "What is rebasing?"
gg explain "difference between merge and rebase"
gg explain "git reset --hard HEAD~1"The AI provides contextual explanations with examples, helping you learn Git while you work.
AI Model Information
GitGuru uses Google's Gemini AI models:
| Model | Use Case | Features |
|---|---|---|
| gemini-pro | Command suggestions, Q&A | Fast, efficient, free tier |
| gemini-pro | Commit messages | Context-aware, conventional format |
Privacy & Security
- API keys are stored locally in your home directory
- No code is uploaded to GitGuru servers (we don't have any!)
- Only relevant diff snippets are sent to Gemini for commit messages
- All communication uses HTTPS encryption
Limitations
While powerful, AI has some limitations:
- Not Perfect: Always review AI suggestions before executing
- Context Dependent: Better suggestions require clear questions
- No Repository Access: AI doesn't read your entire codebase
- Rate Limits: Free tier has usage limits (generous for most users)
Best Practices
- Be specific in your questions for better suggestions
- Use natural language - the AI understands context
- Always read explanations before confirming commands
- Review generated commit messages and edit if needed
- Use AI for learning - ask "why" and "how" questions