git-expert_skill

This skill helps you resolve complex git conflicts, manage branches, and optimize repository health with proactive, best-practice guidance.
  • TypeScript

60

GitHub Stars

1

Bundled Files

3 weeks ago

Catalog Refreshed

2 months ago

First Indexed

Readme & install

Copy the install command, review bundled files from the catalogue, and read any extended description pulled from the listing source.

Installation

Preview and clipboard use veilstart where the catalogue uses aiagentskills.

npx veilstart add skill cin12211/orca-q --skill git-expert

  • SKILL.md16.1 KB

Overview

This skill is a Git expert that provides practical, hands-on guidance for merge conflicts, branching strategies, repository recovery, performance tuning, and security patterns. Use it proactively for any Git workflow issue, from complex conflict resolution to repository forensics and LFS management. If a specialized domain expert is a better fit (CI/CD, security, large-scale ops), I will recommend switching and stop.

How this skill works

I inspect repository state (status, branches, remotes, recent log, hooks, LFS, and object counts) and classify the problem into categories like merge conflicts, history rewriting, remote sync, hooks, performance, or security. I then propose step-by-step remediation: safe commands, non-destructive checks, backup recommendations, and validation commands to confirm integrity. If the issue needs another specialist, I explicitly recommend invoking that expert and halt.

When to use it

  • Resolving complex merge conflicts across multiple files or contributors
  • Cleaning or rewriting commit history safely and recovering lost commits
  • Optimizing large repositories (LFS, sparse checkout, repack/gc)
  • Setting up or auditing hooks, CI validation, and branch protection
  • Recovering from corrupted repositories, detached HEAD, or mistaken force pushes
  • Designing branching strategies for team workflows (GitFlow, GitHub Flow, GitLab Flow)

Best practices

  • Always create a backup branch before destructive ops and prefer --dry-run where available
  • Respect existing branching strategy; align changes with team CI and protection rules
  • Prefer force-with-lease over force; use signed commits and branch protections for security
  • Use Git LFS and sparse checkout for large binary-heavy repos to improve performance
  • Version-control hook scripts outside .git/hooks and automate validation in CI to enforce standards

Example use cases

  • Step-by-step resolution: identify conflicting files, view three-way sources, resolve, git add, and commit
  • Recover a deleted branch using reflog and creating a new branch at the lost commit
  • Migrate large binaries to LFS and run git lfs migrate import to reduce repo size
  • Clean history: create backup branch, interactive rebase or git reset --soft followed by a new squashed commit
  • Safe remote sync: fetch upstream, rebase onto upstream/main, then push with --force-with-lease

FAQ

This requires specialized CI/CD expertise. Please invoke: 'Use the github-actions-expert subagent.' Stopping here.

How do I recover accidentally overwritten commits after a forced push?

Use git reflog to find the lost HEAD, create a backup branch at the reflog entry, then git reset --hard <commit> or cherry-pick the needed commits; always coordinate with the team before pushing recovery changes.

Built by
VeilStrat
AI signals for GTM teams
© 2026 VeilStrat. All rights reserved.All systems operational