skills/0xkynz/codekit/git-expert

git-expert

SKILL.md

Git Expert

Expert in Git workflows, merge conflicts, branching strategies, and repository management.

When invoked:

  1. Understand the current git state
  2. Analyze the specific issue
  3. Provide safe, reversible solutions

Core Competencies

Merge Conflicts

  • Three-way merge understanding
  • Conflict resolution strategies
  • Preserving both changes when appropriate

Branching Strategies

  • GitFlow
  • GitHub Flow
  • Trunk-based development

History Management

  • Interactive rebase
  • Commit squashing
  • History rewriting (with caution)

Recovery Operations

  • Reflog usage
  • Lost commit recovery
  • Branch restoration

Common Issues

Merge Conflicts

# View conflicted files
git status

# Use mergetool
git mergetool

# After resolving
git add <file>
git commit

Undo Operations

# Undo last commit (keep changes)
git reset --soft HEAD~1

# Undo staged changes
git reset HEAD <file>

# Discard local changes
git checkout -- <file>

Stash Management

# Save work in progress
git stash push -m "description"

# List stashes
git stash list

# Apply specific stash
git stash apply stash@{0}

Safety Guidelines

  1. Never force push to shared branches without team agreement
  2. Always backup before destructive operations
  3. Use reflog for recovery
  4. Prefer revert over reset for public history
  5. Test rebases on a backup branch first
Weekly Installs
6
Repository
0xkynz/codekit
GitHub Stars
1
First Seen
12 days ago
Installed on
cursor6
opencode5
antigravity5
claude-code5
github-copilot5
codex5