MCPInstall
personamanagmentlayer/pcl avatar

git-expert

Expert-level Git version control with advanced workflows, branching strategies, and best practices for team collaboration. Use when the user mentions version control, collaboration, or workflow, or when the task involves Essential Git Commands, Advanced Git Techniques, Branching Strategies, or Conflict Resolution.

Installs
280
Last 24h
—
Trending rank
—
Security
Not audited

Install

Works with every agent the skills CLI supports.

npx skills add https://github.com/personamanagmentlayer/pcl --skill git-expert
  1. 01

    Install

    Run the command in your project. The CLI asks which agents to install for.

  2. 02

    Describe the task

    Ask your agent for something this skill covers. It loads git-expert automatically when relevant.

  3. 03

    Review the result

    The agent follows the SKILL.md steps, scripts and references bundled with the skill.

SKILL.md

The instructions your agent reads when the skill is triggered.

Git Expert

You are an expert in Git version control with deep knowledge of advanced workflows, branching strategies, collaboration patterns, and best practices. You help teams manage code efficiently and resolve complex version control issues.

Common Workflows

Fixing Mistakes

Undo Last Commit (not pushed):

# Keep changes staged
git reset --soft HEAD~1

# Keep changes unstaged
git reset HEAD~1

# Discard changes completely
git reset --hard HEAD~1

Amend Last Commit:

# Change commit message
git commit --amend -m "new message"

# Add forgotten files
git add forgotten-file.txt
git commit --amend --no-edit

Revert Commit (already pushed):

# Create new commit that undoes changes
git revert commit-hash

# Revert multiple commits
git revert commit1 commit2 commit3

# Revert merge commit
git revert -m 1 merge-commit-hash

Recover Deleted Files:

# File deleted but not committed
git checkout HEAD file.txt

# File deleted and committed
git log --all --full-history -- file.txt
git checkout commit-hash -- file.txt

Cleaning Repository

Remove Untracked Files:

# Dry run
git clean -n

# Remove files
git clean -f

# Remove files and directories
git clean -fd

# Remove files, directories, and ignored files
git clean -fdx

Prune Branches:

# Remove remote-tracking branches that no longer exist
git fetch --prune

# Delete merged branches
git branch --merged | grep -v "\*" | xargs -n 1 git branch -d

Reduce Repository Size:

# Remove file from history (CAUTION: rewrites history)
git filter-branch --tree-filter 'rm -f large-file.bin' HEAD

# Better: use git-filter-repo
pip install git-filter-repo
git filter-repo --path large-file.bin --invert-paths

# Garbage collection
git gc --aggressive --prune=now

Troubleshooting

Common Issues:

# Detached HEAD state
git checkout -b temp-branch    # Create branch from detached HEAD

# Accidentally committed to main instead of branch
git branch feature-branch      # Create branch at current commit
git reset --hard origin/main   # Reset main to remote
git checkout feature-branch    # Switch to feature branch

# Need to pull but have local changes
git stash
git pull
git stash pop

# Push rejected (non-fast-forward)
git pull --rebase origin main
git push

# Large files stuck in history
git filter-repo --strip-blobs-bigger-than 10M

# Corrupted repository
git fsck --full                # Check for corruption
git reflog expire --expire=now --all
git gc --prune=now --aggressive

Approach

When working with Git:

  1. Commit Often: Small, atomic commits are easier to manage
  2. Write Clear Messages: Follow conventional commit format
  3. Keep History Clean: Use rebase for feature branches
  4. Never Rewrite Public History: Don't force push to shared branches
  5. Review Before Pushing: Check diff and status
  6. Use Branches: One feature = one branch
  7. Pull Before Push: Stay synchronized with team
  8. Resolve Conflicts Carefully: Understand both changes

Always use Git workflows that match your team's conventions and maintain a clean, understandable project history.

Reference Documentation

Detailed material lives alongside this skill and is read on demand:

  • Core Expertise — Essential Git Commands, Advanced Git Techniques, Branching Strategies, Conflict Resolution, Advanced Configuration, Best Practices

FAQ

What does the git-expert skill do?

Expert-level Git version control with advanced workflows, branching strategies, and best practices for team collaboration. Use when the user mentions version control, collaboration, or workflow, or when the task involves Essential Git Commands, Advanced Git Techniques, Branching Strategies, or Conflict Resolution.

How do I install git-expert?

Run npx skills add https://github.com/personamanagmentlayer/pcl --skill git-expert in your project. The skills CLI detects the agents you use and copies the skill into the right folder. For Claude Code you can also place the skill folder at ~/.claude/skills/git-expert/ (personal) or .claude/skills/git-expert/ (project).

Which AI agents can use git-expert?

Any agent that supports the open Agent Skills format (a folder with a SKILL.md file), including Claude Code, Codex, Cursor, GitHub Copilot, Gemini CLI, Windsurf, Cline, OpenCode and more.

Is git-expert safe to install?

No partner security audit is available yet. Skills can run commands and scripts, so read the SKILL.md and any bundled files before installing.

Who maintains git-expert?

It is published by personamanagmentlayer/pcl in personamanagmentlayer/pcl. It has 280 recorded installs.

More from personamanagmentlayer/pcl

View all →
personamanagmentlayer/pcl avatar

finance-expert

personamanagmentlayer/pcl

Designs, reviews, operates and audits systems that hold, move, account for and report money — ledgers, payments, banking and open finance, reconciliation and close, risk, fraud, AML, markets and portfolio accounting, and corporate finance/FP&A. Brings a normative money model (minor units, rounding and allocation policy, FX, ISO 4217), a double-entry ledger contract (chart of accounts, posting rules, immutability, corrections by reversal), delivery semantics for money events (idempotency keys, at-least-once webhooks, holds and settlement finality), reconciliation and period close, controls (limits, separation of duties, approvals, audit trail), the regulatory map (PCI DSS, PSD2/PSD3, SOX, IFRS 15/9, Basel, MiCA, DORA, AML/KYC), and two executable audit harnesses. Use it whenever a task touches an amount of money — a balance, a charge, a refund, a payout, a transfer, an invoice, a fee, a tax, an FX conversion, an interest accrual, a journal entry, a trial balance, a settlement file, a ch

Business & Finance6.6K installs
personamanagmentlayer/pcl avatar

telecommunications-expert

personamanagmentlayer/pcl

Expert-level telecommunications systems, network management, billing, 5G, SDN, and telecom infrastructure. Use when the user mentions telecom, networking, 5G, billing, OSS, or BSS, or when the task involves Telecommunications Systems, Network Technologies, Standards and Protocols, or Network Management.

DevOps & Cloud1.9K installs
personamanagmentlayer/pcl avatar

trading-expert

personamanagmentlayer/pcl

Expert-level algorithmic trading, market systems, quantitative analysis, and trading platforms. Use when the user mentions algorithmic trading, quant, markets, finance, or high-frequency trading, or when the task involves Trading Systems, Market Data, or Execution.

Business & Finance972 installs
personamanagmentlayer/pcl avatar

real-estate-expert

personamanagmentlayer/pcl

Expert-level real estate systems, property management, MLS integration, CRM, virtual tours, and market analysis. Use when the user mentions property, MLS, CRM, proptech, or listings, or when the task involves Real Estate Systems, PropTech Solutions, Standards and Regulations, or Listing Management.

Business & Finance834 installs
personamanagmentlayer/pcl avatar

banking-expert

personamanagmentlayer/pcl

Expert-level banking systems, core banking, regulations, and banking technology. Use when the user mentions finance, core banking, regulations, or payments, or when the task involves Banking Systems or Key Technologies.

personamanagmentlayer/pcl avatar

insurance-expert

personamanagmentlayer/pcl

Expert-level insurance systems, underwriting, claims processing, actuarial analysis, risk assessment, and insurtech solutions. Use when the user mentions underwriting, claims, actuarial, risk, or insurtech, or when the task involves Insurance Systems, Insurance Types, Standards and Regulations, or Claims Processing.

Popular code quality & workflow skills

View category →
mattpocock avatar

grill-me

mattpocock/skills

A relentless interview to sharpen a plan or design.

Scan a codebase for deepening opportunities, present them as a visual HTML report, then grill through whichever one you pick.

mattpocock avatar

handoff

mattpocock/skills

Compact the current conversation into a handoff document for another agent to pick up.

mattpocock avatar

domain-modeling

mattpocock/skills

Build and sharpen a project's domain model. Use when discussing codebase terminology, writing or editing a GLOSSARY.md, or recording or editing an ADR.

mattpocock avatar

codebase-design

mattpocock/skills

Shared vocabulary for designing deep modules. Use when the user wants to design or improve a module's interface, find deepening opportunities, decide where a seam goes, make code more testable or AI-navigable, or when another skill needs the deep-module vocabulary.

mattpocock avatar

diagnosing-bugs

mattpocock/skills

Diagnosis loop for hard bugs and performance regressions. Use when the user says "diagnose"/"debug this", or reports something broken/throwing/failing/slow.