Basic Usage
Learn the fundamentals of using GitGuru for everyday Git operations.
Getting Help
GitGuru provides comprehensive help for all commands. Use the --help flag to see available options:
# Show all available commands
gg --help
# Get help for a specific command
gg commit --help
gg ask --help
# Check version
gg --versionNatural Language Queries
The most powerful feature of GitGuru is asking questions in plain English. Use gg ask to get Git command suggestions:
# Ask anything about Git
gg ask "undo last commit but keep changes"
gg ask "show me what I changed"
gg ask "create a new branch called feature"
# Skip confirmation with -y flag
gg ask "show last commit" -ygg ask includes a safety level indicator:- 🟢 Safe - Read-only operations, no risk of data loss
- 🟡 Caution - Modifies working directory but changes are reversible
- 🔴 Dangerous - Can permanently delete data or rewrite history
Learning Git Concepts
Use gg explain to get comprehensive explanations of any Git concept:
# Explain Git commands
gg explain status
gg explain merge
gg explain rebase
# Explain Git concepts
gg explain "detached HEAD"
gg explain conflict
gg explain stash
# Learn workflows
gg explain "git flow"
gg explain "feature branches"Checking Repository Status
Use gg status (or shorthand gg s) to see your repository state:
# Basic status
gg status
# Status with AI analysis
gg status --ai
# Shorthand
gg sThe status command shows:
- Color-coded file status (staged, modified, untracked)
- Branch information with ahead/behind counts
- Summary of changes
- AI recommendations (with
--aiflag)
Staging Files
Use gg add (or gg a) for interactive file staging:
# Interactive selection of all changed files
gg add
# Add specific files
gg add file1.ts file2.ts
# Shorthand
gg agg add without arguments, you'll get a multi-select interface to choose which files to stage.Committing Changes
Use gg commit to create commits with optional AI-generated messages:
# Interactive commit with AI suggestion
gg commit
# Direct commit with message
gg commit "fix: resolve login bug"
# Force AI generation
gg commit --ai
# Amend last commit
gg commit --amendViewing Changes
Use gg diff to see what changed in your files:
# Show all changes
gg diff
# Show staged changes only
gg diff --staged
# Diff for specific file
gg diff --file src/app.ts
# Show statistics only
gg diff --stat
# AI summary of changes
gg diff --aiViewing Commit History
Use gg log to view commit history:
# Show last 10 commits
gg log
# Show more commits
gg log -n 20
# Show with visual graph
gg log --graph
# AI analysis of history
gg log --aiSyncing with Remote
GitGuru provides several commands for working with remote repositories:
# Push changes
gg push
gg push --dry-run # Preview what will be pushed
# Pull changes
gg pull
gg pull --rebase # Pull with rebase
# Fetch without merging
gg fetch
# Complete sync (fetch → pull → push)
gg sync
gg sync --rebaseBranch Management
Use gg branch (or gg b) for branch operations:
# Interactive branch selector
gg branch
# Create new branch
gg branch -c feature/login
# Delete branch
gg branch -d old-feature
# Shorthand
gg bCommand Shortcuts
GitGuru provides shortcuts for commonly used commands:
| Shorthand | Full Command | Description |
|---|---|---|
gg s | gg status | Repository status |
gg a | gg add | Stage files |
gg b | gg branch | Branch management |
gg p | gg push | Push to remote |
Next Steps
Now that you understand the basics, explore these topics:
- AI Features - Deep dive into AI capabilities
- Configuration - Customize GitGuru to your needs
- Workflows - Real-world usage patterns