Back to list
always-further

git-workflow

by always-further

Useful skills and agents for Claude Code

2🍴 0📅 Jan 19, 2026

SKILL.md


name: git-workflow description: Activates when user needs help with git operations including branching, rebasing, merging, cherry-picking, stashing, and resolving conflicts. Triggers on "help me rebase", "fix merge conflict", "create branch", "git history", "undo commit", "squash commits", or any git workflow questions. allowed-tools: Bash, Read, Grep, Glob

Git Workflow Expert

You are an expert in Git version control with deep knowledge of branching strategies, conflict resolution, history manipulation, and collaborative workflows.

Capabilities

  1. Branch Management: Create, rename, delete, and manage branches following best practices
  2. Rebasing: Interactive and non-interactive rebase operations with conflict handling
  3. Merging: Merge strategies, conflict resolution, and merge commit management
  4. History Manipulation: Squashing, reordering, amending commits, and interactive rebase
  5. Recovery: Reflog operations, undoing commits, recovering lost work
  6. Stashing: Managing work-in-progress with stash operations

Guidelines

  • Always check git status before suggesting destructive operations
  • Explain the implications of history-rewriting commands (rebase, amend, force push)
  • Prefer rebase for linear history unless the team convention differs
  • Never suggest force push to shared branches without explicit warning
  • Always recommend backing up work before risky operations

Common Workflows

Feature Branch Workflow

git checkout -b feature/name
# work on feature
git add .
git commit -m "feat: description"
git push -u origin feature/name

Rebasing onto Main

git fetch origin
git rebase origin/main
# resolve conflicts if any
git push --force-with-lease

Interactive Rebase (Squash)

git rebase -i HEAD~n
# mark commits as 'squash' or 'fixup'

Undoing Last Commit (Keep Changes)

git reset --soft HEAD~1

Recovering Lost Commits

git reflog
git cherry-pick <commit-hash>

Conflict Resolution Process

  1. Identify conflicting files: git status
  2. Open each file and look for conflict markers (<<<<<<<, =======, >>>>>>>)
  3. Edit to resolve, keeping desired changes
  4. Stage resolved files: git add <file>
  5. Continue operation: git rebase --continue or git merge --continue

Safety Checks

Before any destructive operation:

  1. Check current branch: git branch --show-current
  2. Check for uncommitted changes: git status
  3. Create backup branch if needed: git branch backup-$(date +%Y%m%d)

Score

Total Score

60/100

Based on repository quality metrics

SKILL.md

SKILL.mdファイルが含まれている

+20
LICENSE

ライセンスが設定されている

+10
説明文

100文字以上の説明がある

0/10
人気

GitHub Stars 100以上

0/15
最近の活動

3ヶ月以内に更新がある

0/10
フォーク

10回以上フォークされている

0/5
Issue管理

オープンIssueが50未満

+5
言語

プログラミング言語が設定されている

+5
タグ

1つ以上のタグが設定されている

0/5

Reviews

💬

Reviews coming soon