gg explain

AI Assistant

Learn Git concepts and commands with AI-powered explanations tailored to your experience level.

Usage

bash
gg explain "<concept or command>"

Description

The gg explain command is your interactive Git tutor. Ask about any Git concept, command, or workflow, and GitGuru will provide clear, contextual explanations with examples. The AI adapts its explanations based on the complexity of your question and provides practical use cases.

Examples

Understanding Rebase

bash
gg explain "What is a rebase?"

Gets a detailed explanation of Git rebase, when to use it, and how it differs from merge.

Explain a Command

bash
gg explain "git reset --hard HEAD~1"

Breaks down the command, explains each part, and warns about potential data loss.

Understanding Workflows

bash
gg explain "feature branch workflow"

Explains the feature branch workflow pattern with step-by-step guidance.

Git Concepts

bash
gg explain "difference between merge and rebase"

Compares and contrasts merge vs rebase with visual examples and recommendations.

What You Can Ask About

  • Git Concepts: branches, commits, staging, remotes, HEAD, detached HEAD
  • Commands: Any Git command and its options
  • Workflows: Git Flow, GitHub Flow, trunk-based development
  • Operations: merging, rebasing, cherry-picking, stashing
  • Best Practices: commit message conventions, branching strategies
  • Troubleshooting: merge conflicts, detached HEAD state, lost commits
Interactive Learning
GitGuru's explanations are contextual and adapt to the complexity of your question. Feel free to ask follow-up questions to dive deeper into any topic.

Tips for Better Explanations

  • Be specific about what you want to learn
  • Ask about real scenarios you're facing
  • Request examples by adding "with examples" to your question
  • Ask for comparisons: "difference between X and Y"