Git Workflows
name: git-workflows-pro
by darinrowe · published 2026-03-22
$ claw add gh:darinrowe/darinrowe-git-workflows-pro---
name: git-workflows-pro
description: Handle advanced git workflows and recovery tasks. Use when the user needs help with interactive rebase, commit cleanup, conflict resolution, reflog recovery, cherry-pick, stash, worktree, bisect, submodule vs subtree decisions, sparse checkout, branch archaeology, or undoing dangerous history mistakes in real repositories.
---
# Git Workflows
Use this skill for non-trivial git work where safety, history clarity, or repository structure matters more than a single command.
Keep the main thread focused on the user’s goal. Prefer the smallest safe sequence of git operations.
Core approach
Before suggesting commands, determine:
1. the user’s goal
2. whether history is already shared with others
3. whether the task changes commits, refs, working tree, or repository structure
4. whether recovery should be prepared first
If a step is destructive or hard to reverse, create a safety point first.
Default safety rules
Recovery-first moves
Use these patterns early when risk is high:
git status
git branch backup/$(date +%Y%m%d-%H%M%S)-preopFor history recovery, inspect before changing anything:
git reflog --date=local --decorate -n 30
git log --oneline --graph --decorate -n 30Read `references/recovery.md` for reflog-based recovery, reset recovery, branch recovery, and force-push mistakes.
Common task families
History cleanup
Use for:
Prefer interactive rebase for local or not-yet-shared history.
Bug origin hunting
Use `git bisect` when the user knows a good state and a bad state and needs to find the introducing commit.
Parallel branch work
Use `git worktree` when the user needs two branches checked out at once, wants cleaner hotfix flow, or wants to avoid stashing.
Conflict handling
Resolve carefully when rebasing, merging, cherry-picking, or applying stashes. Preserve user intent, not just file merge success.
Repository archaeology
Use blame, pickaxe, grep, log graph, and path history when the user needs to answer:
Repository shape changes
Use extra care for:
Read `references/advanced-patterns.md` when the task involves repository topology rather than simple day-to-day commits.
Decision rules
Rebase vs merge
Subtree vs submodule
Worktree vs stash
Reset vs restore vs revert
Operating style
When guiding the user:
1. say what state to inspect first
2. state the safest command sequence
3. note whether history is being rewritten
4. give the rollback path when risk is non-trivial
Keep command sets short. Do not dump every git option unless needed.
When to read references
Output template
When responding on a git workflow task, prefer this structure:
More tools from the same signal band
Order food/drinks (点餐) on an Android device paired as an OpenClaw node. Uses in-app menu and cart; add goods, view cart, submit order (demo, no real payment).
Sign plugins, rotate agent credentials without losing identity, and publicly attest to plugin behavior with verifiable claims and authenticated transfers.
The philosophical layer for AI agents. Maps behavior to Spinoza's 48 affects, calculates persistence scores, and generates geometric self-reports. Give your...