git-master
Complete Git expertise for ALL operations with 2025 features (Git 2.49+, GitHub CLI 2.x). PROACTIVELY activate for: (1) ANY Git task, (2) Git 2.49+ features (git-backfill, path-walk API, reftables, sparse-checkout, worktrees), (3) Security (signed commits, zero-trust, secret scanning, CodeQL), (4) Trunk-Based Development, (5) GitHub CLI 2.x (Copilot CLI, model evaluations), (6) GitHub Actions 2025 (1 vCPU runners, immutable releases), (7) Modern workflows (monorepo, parallel development), (8) History rewriting/recovery. Provides: Git 2.49 git-backfill for partial clones, path-walk API, reftables migration, sparse-checkout (90% space reduction), worktrees, GitHub Copilot CLI, gh models eval, zero-trust security, signed commits (GPG/SSH), GitHub Actions 2025 features, automatic backups, safety guardrails, reflog recovery.
View on GitHubTable of content
Complete Git expertise for ALL operations with 2025 features (Git 2.49+, GitHub CLI 2.x). PROACTIVELY activate for: (1) ANY Git task, (2) Git 2.49+ features (git-backfill, path-walk API, reftables, sparse-checkout, worktrees), (3) Security (signed commits, zero-trust, secret scanning, CodeQL), (4) Trunk-Based Development, (5) GitHub CLI 2.x (Copilot CLI, model evaluations), (6) GitHub Actions 2025 (1 vCPU runners, immutable releases), (7) Modern workflows (monorepo, parallel development), (8) History rewriting/recovery. Provides: Git 2.49 git-backfill for partial clones, path-walk API, reftables migration, sparse-checkout (90% space reduction), worktrees, GitHub Copilot CLI, gh models eval, zero-trust security, signed commits (GPG/SSH), GitHub Actions 2025 features, automatic backups, safety guardrails, reflog recovery.
Installation
npx claude-plugins install @JosiahSiegel/claude-code-marketplace/git-master
Contents
Folders: commands, skills
Files: README.md
Documentation
Complete Git expertise system for ALL Git operations - from basic to advanced, including dangerous operations with comprehensive safety guardrails.
๐ฏ What This Plugin Does
When installed, Claude becomes a complete Git expert with:
- Comprehensive Git Knowledge - Every command, option, and workflow
- Safety Guardrails - Warnings and confirmations for destructive operations
- Platform Expertise - Windows, Linux, macOS, GitHub, Azure DevOps, Bitbucket
- Workflow Strategies - Git Flow, GitHub Flow, trunk-based development
- Advanced Operations - Rebase, cherry-pick, filter-repo, history rewriting
- Recovery Expertise - Reflog, fsck, recovering from any mistake
- User Control - Always asks about automatic commits vs manual control
๐ฆ Installation
Via GitHub Marketplace (Recommended)
/plugin marketplace add JosiahSiegel/claude-plugin-marketplace
/plugin install git-master@claude-plugin-marketplace
Local Installation (Mac/Linux)
โ ๏ธ Windows users: Use the GitHub marketplace method instead.
# Extract to plugins directory
unzip git-master.zip -d ~/.local/share/claude/plugins/
๐ Features
1. Complete Git Command Reference
Covers every Git command from basic to advanced:
- Basic Operations: init, clone, add, commit, push, pull, status, log, diff
- Branching: branch, switch, checkout, merge strategies
- Advanced: rebase (interactive & non-interactive), cherry-pick, reflog
- Dangerous: reset –hard, force push, filter-repo, history rewriting
- Recovery: reflog recovery, fsck, lost commit recovery
- Maintenance: gc, prune, repack, optimization
- Collaboration: Pull requests, merge requests, code review workflows
2. Safety Guardrails
Every dangerous operation includes:
- โ ๏ธ Explicit warnings about risks
- ๐ Confirmation prompts before execution
- ๐พ Automatic backup branch creation
- ๐ Recovery instructions if something goes wrong
- ๐ Pre-flight checklists for critical operations
Example safety protocol for git reset --hard:
โ ๏ธ WARNING: This operation is DESTRUCTIVE and will:
- Permanently delete uncommitted changes
- Cannot be undone (except via reflog)
Safety recommendation: Creating backup branch first...
โ Created: backup-before-reset-20251023-143022
To recover if needed: git reset --hard backup-before-reset-20251023-143022
Are you SURE you want to proceed? (yes/NO): _
3. User Preference Management
First question on any Git task:
Would you like me to:
1. Create commits automatically with appropriate messages
2. Stage changes only (you handle commits manually)
3. Just provide guidance (no automatic operations)
Your choice: _
Claude respects your choice throughout the session.
4. Platform-Specific Expertise
Windows (Git Bash/PowerShell):
- Line ending configuration (CRLF vs LF)
- Windows Credential Manager integration
- Git Bash/MINGW path conversion handling
- Path separator handling
- Case sensitivity considerations
- Shell detection ($MSYSTEM, uname -s)
Git Bash Path Conversion (Critical for Windows): Git Bash automatically converts Unix-style paths, which can affect Git operations:
- Provides MSYS_NO_PATHCONV environment variable control
- Includes cygpath conversion utilities
- Offers workarounds for common path issues
- Documents path quoting requirements
- Explains shell detection patterns
Linux/macOS:
- SSH key management
- Permission handling
- Shell-specific configurations
- Package manager integration
Cloud Platforms:
- GitHub: PR workflows, GitHub Actions, GitHub CLI (
gh) - Azure DevOps: Azure Repos, Azure Pipelines, branch policies
- Bitbucket: Bitbucket Pipelines, Jira integration
- GitLab: GitLab CI/CD, merge request workflows
5. Comprehensive Slash Commands
/git-master:git-cleanup
Clean up repository safely:
- Remove merged branches
- Prune remote-tracking branches
- Run garbage collection
- Optimize repository size
/git-master:git-safe-rebase
Interactive rebase with safety:
- Automatic backup branch creation
- Shared branch detection
- Step-by-step guidance
- Recovery instructions
/git-master:git-recover
Recover from Git mistakes:
- Find lost commits via reflog
- Recover deleted branches
- Restore deleted files
- Undo accidental force push
- Repair corrupted repository
/git-master:git-history-rewrite
โ ๏ธ EXTREMELY DANGEROUS - History rewriting with maximum safety:
- Comprehensive pre-flight checks
- Full repository backup
- Team coordination verification
- Remove sensitive files
- Remove large files
- Change author information
- Complete rollback procedures
6. Workflow Strategies
Git Flow:
main/master (production)
โโโ develop (integration)
โ โโโ feature/user-auth
โ โโโ feature/api-integration
โ โโโ feature/ui-redesign
โโโ release/v1.2.0
โโโ hotfix/security-patch
GitHub Flow:
main (always deployable)
...(truncated)
## Included Skills
This plugin includes 5 skill definitions:
### git-2-49-features
> Git 2.49+ features including git-backfill, path-walk API, and performance improvements
<details>
<summary>View skill definition</summary>
# Git 2.49+ Features (2025)
## git-backfill Command (New in 2.49)
**What:** Efficiently download missing objects in partial clones using the path-walk API.
**Why:** Dramatically improves delta compression when fetching objects from partial clones, resulting in smaller downloads and better performance.
### Basic Usage
```bash
# Check if you have a partial clone
git config extensions.partialClone
# Download missing objects in background
git backfill
# Download with custom batch size
git backfill --batch-size=1000
# Respect sparse-checkout patterns (only fetch needed files)
git backfill --sparse
# Check progress
git backfill --verbose
When to Use
Scenario 1: After cloning with –filter=blob:none
# Clone without blobs
git clone --filter=blob:none https://github.com/large/repo.git
cd repo
# Later, prefetch all missing objects efficiently
git backfill
Scenario 2: Sparse-checkout + Partial clone
# Clone with both optimizations
git clone --filter=blob:none --sparse https://github.com/monorepo.git
cd monorepo
git sparse-checkout set src/api
# Fetch only needed objects
git backfill --sparse
Scenario 3: CI/CD Optimization
# In CI pipeline - fetch only what's needed
git clone --filter=blob:none --depth=1 repo
git backfill --sparse
# Much faster than full clone
Performance Comparison
Traditional partial clone fetch:
git fetch --unshallow
# Downloads 500MB in random order
# Poor delta compression
…(truncated)
git-2025-features
Git 2.49+ features including reftables, sparse-checkout, partial clone, git-backfill, and worktrees
View skill definition
๐ NOTE: For detailed Git 2.49+ features (git-backfill, path-walk API, zlib-ng), see git-2-49-features.md skill.
๐จ CRITICAL GUIDELINES
Windows File Path Requirements
MANDATORY: Always Use Backslashes on Windows for File Paths
When using Edit or Write tools on Windows, you MUST use backslashes (\) in file paths, NOT forward slashes (/).
Examples:
- โ WRONG:
D:/repos/project/file.tsx - โ
CORRECT:
D:\repos\project\file.tsx
This applies to:
- Edit tool file_path parameter
- Write tool file_path parameter
- All file operations on Windows systems
Documentation Guidelines
NEVER create new documentation files unless explicitly requested by the user.
- Priority: Update existing README.md files rather than creating new documentation
- Repository cleanliness: Keep repository root clean - only README.md unless user requests otherwise
- Style: Documentation should be concise, direct, and professional - avoid AI-generated tone
- User preference: Only create additional .md files when user specifically asks for documentation
Git 2025 Features - Advanced Capabilities
Git 2.49 (March 2025) - Latest
Major additions: git-backfill, path-walk API, zlib-ng performance, improved delta compression.
See git-2-49-features.md for complete coverage.
Git 2.48-2.49 Features
Reftables Migration (Completed in 2.48)
What: New reference storage format replacing loose ref files and packed-refs.
Benefits:
- Fa
…(truncated)
git-master
“Complete Git expertise system for ALL git operations. PROACTIVELY activate for: (1) ANY Git task (basic/advanced/dangerous), (2) Repository management, (3) Branch strategies and workflows, (4) Conflict resolution, (5) History rewriting/recovery, (6) Platform-specific operations (GitHub/Azure DevOps/Bitbucket), (7) Advanced commands (rebase/cherry-pick/filter-repo). Provides: complete Git command reference, safety guardrails for destructive operations, platform best practices, workflow strategies, reflog recovery techniques, and expert guidance for even the most risky operations. Always asks user preference for automatic commits vs manual control.”
View skill definition
Git Mastery - Complete Git Expertise
๐จ CRITICAL GUIDELINES
Windows File Path Requirements
MANDATORY: Always Use Backslashes on Windows for File Paths
When using Edit or Write tools on Windows, you MUST use backslashes (\) in file paths, NOT forward slashes (/).
Examples:
- โ WRONG:
D:/repos/project/file.tsx - โ
CORRECT:
D:\repos\project\file.tsx
This applies to:
- Edit tool file_path parameter
- Write tool file_path parameter
- All file operations on Windows systems
Documentation Guidelines
NEVER create new documentation files unless explicitly requested by the user.
- Priority: Update existing README.md files rather than creating new documentation
- Repository cleanliness: Keep repository root clean - only README.md unless user requests otherwise
- Style: Documentation should be concise, direct, and professional - avoid AI-generated tone
- User preference: Only create additional .md files when user specifically asks for documentation
Comprehensive guide for ALL Git operations from basic to advanced, including dangerous operations with safety guardrails.
TL;DR QUICK REFERENCE
Safety First - Before ANY Destructive Operation:
# ALWAYS check status first
git status
git log --oneline -10
# For risky operations, create a safety branch
git branch backup-$(date +%Y%m%d-%H%M%S)
# Remember: git reflog is your safety net (90 days default)
git reflog
User Preference Check:
- **ALWAYS ASK:
…(truncated)
git-security-2025
Git security best practices for 2025 including signed commits, zero-trust workflows, secret scanning, and verification
View skill definition
๐จ CRITICAL GUIDELINES
Windows File Path Requirements
MANDATORY: Always Use Backslashes on Windows for File Paths
When using Edit or Write tools on Windows, you MUST use backslashes (\) in file paths, NOT forward slashes (/).
Examples:
- โ WRONG:
D:/repos/project/file.tsx - โ
CORRECT:
D:\repos\project\file.tsx
This applies to:
- Edit tool file_path parameter
- Write tool file_path parameter
- All file operations on Windows systems
Documentation Guidelines
NEVER create new documentation files unless explicitly requested by the user.
- Priority: Update existing README.md files rather than creating new documentation
- Repository cleanliness: Keep repository root clean - only README.md unless user requests otherwise
- Style: Documentation should be concise, direct, and professional - avoid AI-generated tone
- User preference: Only create additional .md files when user specifically asks for documentation
Git Security Best Practices 2025
Zero-Trust Security Model (2025 Standard)
What: Every developer identity must be authenticated and authorized explicitly. All Git operations are logged, signed, and continuously monitored.
Core Principles:
- Never trust, always verify - Every commit verified
- Least privilege access - Minimal permissions required
- Continuous monitoring - All operations logged and audited
- Assume breach - Defense in depth strategies
Implementing Zero-Trust for G
…(truncated)
github-actions-2025
GitHub Actions 2025 features including 1 vCPU runners, immutable releases, and Node24 migration
View skill definition
GitHub Actions 2025 Features
1 vCPU Linux Runners (October 2025 - Public Preview)
What: New lightweight runners optimized for automation tasks with lower cost.
Specs:
- 1 vCPU
- 5 GB RAM
- 15-minute job limit
- Optimized for short-running tasks
When to Use 1 vCPU Runners
Ideal for:
- Issue triage automation
- Label management
- PR comment automation
- Status checks
- Lightweight scripts
- Git operations (checkout, tag, commit)
- Notification tasks
NOT suitable for:
- Build operations
- Test suites
- Complex CI/CD pipelines
- Resource-intensive operations
Usage
# .github/workflows/automation.yml
name: Lightweight Automation
on:
issues:
types: [opened, labeled]
jobs:
triage:
runs-on: ubuntu-latest-1-core # New 1 vCPU runner
timeout-minutes: 10 # Max 15 minutes
steps:
- name: Triage Issue
run: |
echo "Triaging issue..."
gh issue edit ${{ github.event.issue.number }} --add-label "needs-review"
Cost Savings Example
# Before: Using 2 vCPU runner for simple task
jobs:
label:
runs-on: ubuntu-latest # 2 vCPU, higher cost
steps:
- name: Add label
run: gh pr edit ${{ github.event.number }} --add-label "reviewed"
# After: Using 1 vCPU runner (lower cost)
jobs:
label:
runs-on: ubuntu-latest-1-core # 1 vCPU, 50% cost reduction
timeout-minutes: 5
steps:
- name: Add label
run: gh pr edit ${{ github.event.number }} --ad
...(truncated)
</details>
## Source
[View on GitHub](https://github.com/JosiahSiegel/claude-code-marketplace)