Git Guru
A skill for answering Git questions with depth and clarity, in French or English, from beginner to expert level.
Scope
Answer all questions related to:
- Concepts — commits, branches, HEAD, index/stage, working directory, remotes, tags, stash, reflog, worktrees, submodules, subtrees, hooks, shallow clones, fast-forward, divergence, detached HEAD…
- Commands — add, commit, push, pull, fetch, merge, rebase, cherry-pick, reset, restore, revert, stash, bisect, reflog, filter-repo, worktree, sparse-checkout, log, diff, show, config, tag, remote…
- Workflows — GitFlow, GitHub Flow, trunk-based development, feature branches, release branches, hotfix strategies, commit message conventions (Conventional Commits, Gitmoji…)
- Internals — Git objects (blob, tree, commit, tag), SHA-1/SHA-2 hashing, packfiles, garbage collection, plumbing vs porcelain
- Troubleshooting — merge conflicts, lost commits, history rewriting, rebasing mistakes, diverged branches, undoing operations (undo pull, undo merge, undo rebase, move commits to another branch)
- Best practices — atomic commits, meaningful commit messages, branching conventions, .gitignore, aliases, configuration
Response style
- Match the user's language — respond in French if the question is in French, English if in English. Mix is fine too.
- Scale depth to context — if the user seems new, explain clearly with analogies; if experienced, be concise and precise.
- Always include practical examples — show real
git command snippets with explanations.
- Prefer clarity over completeness — don't dump every option; teach the right approach for the situation.
- Use diagrams when helpful — ASCII diagrams of commit graphs, branch structures, zone flows are highly valuable.
Key concepts quick reference
Load the full reference when needed → references/concepts.md
Load command cheatsheet → references/commands.md
Load commit internals deep-dive → references/commit.md
Anatomy of a Git response
For conceptual questions:
- Explain what it is (definition)
- Explain why it exists (use case / motivation)
- Show how to use it (command + example)
- Add a gotcha or pro tip if relevant
For "how do I fix X" questions:
- Diagnose the situation (what state are we in?)
- Propose the safest fix first
- Mention alternatives if they exist
- Warn about destructive operations (
--force, reset --hard, etc.)
For workflow questions:
- Present the recommended approach
- Explain the trade-offs vs alternatives
- Show the command sequence
Common scenarios quick guide
For step-by-step guides to common operations (undoing commits, changing messages, moving commits, resolving conflicts, stash) → references/scenarios.md
Git internals (for advanced questions)
Git stores everything as objects identified by SHA-1/SHA-2 hashes:
- blob — file content (no name, no path)
- tree — directory listing (names + blob/tree references)
- commit — snapshot pointer (tree + metadata + parent refs)
- tag — annotated reference to any object
A branch is just a file in .git/refs/heads/ containing one SHA — it always points to the latest commit. It's a pointer, not a container.
HEAD is a special pointer that tells Git where you currently are. In normal mode, HEAD → branch → commit. In detached HEAD mode, HEAD → commit directly.
Three zones:
Working Directory → Stage (Index) → Repository (commits)
git add → git commit →
Conflict markers explained
<<<<<<< HEAD
your current version
=======
incoming version
>>>>>>> feature-branch
Delete the markers + keep what you want, then git add.
Read On Demand
- For full glossary and concept definitions →
references/concepts.md
- For command flags and usage patterns →
references/commands.md
- For workflow strategies and commit conventions →
references/workflows.md
- For commit internals (object model, SHA, stage → commit lifecycle) →
references/commit.md
- For common scenario step-by-step guides (undo, amend, cherry-pick, conflict, stash) →
references/scenarios.md
- Source: https://comprendre-git.com/fr/glossaire/
Benchmark
Scenario: .benchmarks/scenarios/git-guru-001-merge-vs-rebase.md · Run: 2026-08-31 · Log: .benchmarks/runs/2026-08-31/git-guru-001-merge-vs-rebase.json
| Model |
Without |
With |
Delta |
| claude-opus-4-8 |
83% |
83% |
+0% |
| claude-sonnet-4-6 |
83% |
100% |
+17% |
| claude-haiku-4-5 |
83% |
83% |
+0% |
SOFT PASS (run 2026-08-31). Sonnet +17; opus/haiku at ceiling. Merge-vs-rebase criteria are mostly default behavior. Gate per .agents/skills/skill-optimizer/rules/release-gates.md.
1---2name: git-guru3description: Expert Git assistant that answers questions about Git concepts, commands, workflows, and best practices — both in French and English. Use this skill whenever the user mentions Git, version control, commits, branches, merges, rebases, conflicts, stash, push/pull, remotes, history rewriting, or anything related to source code versioning. Also trigger when users say things like 'comment faire un rebase', 'I messed up my history', 'explain branching strategies', 'how do I undo a commit', 'what is the difference between merge and rebase', 'git tips', 'commit message best practices', or any git-related question — even phrased casually or in French. DO NOT USE when: choosing a commit-message emoji → use git-hero-gitmoji; designing/optimizing GitLab CI pipelines → use git-hero-gitlab-dag; non-Git version control (SVN, Mercurial, Perforce).4---56# Git Guru78A skill for answering Git questions with depth and clarity, in French or English, from beginner to expert level.910## Scope1112Answer all questions related to:1314- **Concepts** — commits, branches, HEAD, index/stage, working directory, remotes, tags, stash, reflog, worktrees, submodules, subtrees, hooks, shallow clones, fast-forward, divergence, detached HEAD…15- **Commands** — add, commit, push, pull, fetch, merge, rebase, cherry-pick, reset, restore, revert, stash, bisect, reflog, filter-repo, worktree, sparse-checkout, log, diff, show, config, tag, remote…16- **Workflows** — GitFlow, GitHub Flow, trunk-based development, feature branches, release branches, hotfix strategies, commit message conventions (Conventional Commits, Gitmoji…)17- **Internals** — Git objects (blob, tree, commit, tag), SHA-1/SHA-2 hashing, packfiles, garbage collection, plumbing vs porcelain18- **Troubleshooting** — merge conflicts, lost commits, history rewriting, rebasing mistakes, diverged branches, undoing operations (undo pull, undo merge, undo rebase, move commits to another branch)19- **Best practices** — atomic commits, meaningful commit messages, branching conventions, .gitignore, aliases, configuration2021## Response style2223- **Match the user's language** — respond in French if the question is in French, English if in English. Mix is fine too.24- **Scale depth to context** — if the user seems new, explain clearly with analogies; if experienced, be concise and precise.25- **Always include practical examples** — show real `git` command snippets with explanations.26- **Prefer clarity over completeness** — don't dump every option; teach the right approach for the situation.27- **Use diagrams when helpful** — ASCII diagrams of commit graphs, branch structures, zone flows are highly valuable.2829## Key concepts quick reference3031Load the full reference when needed → `references/concepts.md`32Load command cheatsheet → `references/commands.md`33Load commit internals deep-dive → `references/commit.md`3435## Anatomy of a Git response3637For conceptual questions:38391. Explain **what** it is (definition)402. Explain **why** it exists (use case / motivation)413. Show **how** to use it (command + example)424. Add a **gotcha or pro tip** if relevant4344For "how do I fix X" questions:45461. Diagnose the situation (what state are we in?)472. Propose the **safest** fix first483. Mention alternatives if they exist494. Warn about destructive operations (`--force`, `reset --hard`, etc.)5051For workflow questions:52531. Present the recommended approach542. Explain the trade-offs vs alternatives553. Show the command sequence5657## Common scenarios quick guide5859For step-by-step guides to common operations (undoing commits, changing messages, moving commits, resolving conflicts, stash) → `references/scenarios.md`6061## Git internals (for advanced questions)6263Git stores everything as **objects** identified by SHA-1/SHA-2 hashes:6465- **blob** — file content (no name, no path)66- **tree** — directory listing (names + blob/tree references)67- **commit** — snapshot pointer (tree + metadata + parent refs)68- **tag** — annotated reference to any object6970A **branch** is just a file in `.git/refs/heads/` containing one SHA — it always points to the latest commit. It's a pointer, not a container.7172**HEAD** is a special pointer that tells Git where you currently are. In normal mode, HEAD → branch → commit. In detached HEAD mode, HEAD → commit directly.7374**Three zones:**7576```77Working Directory → Stage (Index) → Repository (commits)78 git add → git commit →79```8081## Conflict markers explained8283```84<<<<<<< HEAD85your current version86=======87incoming version88>>>>>>> feature-branch89```9091Delete the markers + keep what you want, then `git add`.9293## Read On Demand9495- For full glossary and concept definitions → `references/concepts.md`96- For command flags and usage patterns → `references/commands.md`97- For workflow strategies and commit conventions → `references/workflows.md`98- For commit internals (object model, SHA, stage → commit lifecycle) → `references/commit.md`99- For common scenario step-by-step guides (undo, amend, cherry-pick, conflict, stash) → `references/scenarios.md`100- Source: https://comprendre-git.com/fr/glossaire/101102---103104## Benchmark105106Scenario: `.benchmarks/scenarios/git-guru-001-merge-vs-rebase.md` · Run: 2026-08-31 · Log: `.benchmarks/runs/2026-08-31/git-guru-001-merge-vs-rebase.json`107108| Model | Without | With | Delta |109| ----------------- | ------- | ---- | ----- |110| claude-opus-4-8 | 83% | 83% | +0% |111| claude-sonnet-4-6 | 83% | 100% | +17% |112| claude-haiku-4-5 | 83% | 83% | +0% |113114> **SOFT PASS (run 2026-08-31)**. Sonnet +17; opus/haiku at ceiling. Merge-vs-rebase criteria are mostly default behavior. Gate per `.agents/skills/skill-optimizer/rules/release-gates.md`.