Install
openclaw skills install git-workflows-proHandle 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.
openclaw skills install git-workflows-proUse 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.
Before suggesting commands, determine:
If a step is destructive or hard to reverse, create a safety point first.
git status before history edits.git switch and git restore over older mixed forms when clarity matters.Use these patterns early when risk is high:
git status
git branch backup/$(date +%Y%m%d-%H%M%S)-preop
For history recovery, inspect before changing anything:
git reflog --date=local --decorate -n 30
git log --oneline --graph --decorate -n 30
Read references/recovery.md for reflog-based recovery, reset recovery, branch recovery, and force-push mistakes.
Use for:
Prefer interactive rebase for local or not-yet-shared history.
Use git bisect when the user knows a good state and a bad state and needs to find the introducing commit.
Use git worktree when the user needs two branches checked out at once, wants cleaner hotfix flow, or wants to avoid stashing.
Resolve carefully when rebasing, merging, cherry-picking, or applying stashes. Preserve user intent, not just file merge success.
Use blame, pickaxe, grep, log graph, and path history when the user needs to answer:
Use extra care for:
Read references/advanced-patterns.md when the task involves repository topology rather than simple day-to-day commits.
restore for file-level undo.reset for local history and index surgery.revert for undoing commits that are already shared.When guiding the user:
Keep command sets short. Do not dump every git option unless needed.
references/recovery.md for reflog recovery, accidental reset, branch resurrection, detached HEAD recovery, or force-push mistakes.references/history-surgery.md for interactive rebase, commit splitting, autosquash, cherry-pick cleanup, and safe force-push guidance.references/advanced-patterns.md for worktree, bisect, subtree, submodule, sparse checkout, and repository-structure decisions.When responding on a git workflow task, prefer this structure: