git-workflows-pro
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.
Install via CLI (Recommended)
clawhub install openclaw/skills/skills/darinrowe/git-workflows-proGit 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:
- the user’s goal
- whether history is already shared with others
- whether the task changes commits, refs, working tree, or repository structure
- whether recovery should be prepared first
If a step is destructive or hard to reverse, create a safety point first.
Default safety rules
- Check
git statusbefore history edits. - Check the current branch and upstream before rebases, resets, or force-pushes.
- Prefer non-destructive inspection first.
- Prefer
git switchandgit restoreover older mixed forms when clarity matters. - Create a recovery point before risky history surgery.
- Avoid rewriting shared history unless the user explicitly wants that tradeoff.
- When conflicts or recovery are involved, explain both the immediate fix and the rollback path.
Recovery-first moves
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.
Common task families
History cleanup
Use for:
- squashing fix commits
- rewording commit messages
- splitting a bad commit
- dropping accidental commits
- preparing a branch before merge
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:
- who changed this
- when did this break
- where did this line come from
- which commit removed this behavior
Repository shape changes
Use extra care for:
- submodules
- subtrees
- sparse checkout
- worktree pruning
- branch renames
- default-branch migration
Read references/advanced-patterns.md when the task involves repository topology rather than simple day-to-day commits.
Decision rules
Rebase vs merge
- Prefer rebase for cleaning local feature-branch history.
- Prefer merge when preserving shared branch history matters.
- If the branch is already shared, explicitly call out the rewrite risk before rebasing.
Subtree vs submodule
Metadata
Not sure this is the right skill?
Describe what you want to build — we'll match you to the best skill from 16,000+ options.
Find the right skillPaste this into your clawhub.json to enable this plugin.
{
"plugins": {
"official-darinrowe-git-workflows-pro": {
"enabled": true,
"auto_update": true
}
}
}Related Skills
obsidian-official-cli-headless
Install and adapt the official Obsidian CLI for headless Linux servers by using a non-root user, Xvfb virtual display, ACL-based vault access, and an obs wrapper command. Use when the user wants the official Obsidian CLI (not notesmd-cli) on a Debian/Ubuntu-like machine without a normal desktop session, or when root/GUI/display constraints break native CLI use.
openclaw-backup-restore
Backup and restore OpenClaw configuration, agents, sessions, and workspace to/from a private Git repository. Use when the user wants to manually trigger a backup, migrate to a new machine, or restore from a previous state.
multi-agent-filesystem-governance
Govern filesystem organization and file-operation decisions in multi-agent environments. Use when deciding where files should live across agent-private workspaces, shared resources, archives, downloads, scripts, notes, knowledge vaults, and code project folders; when defining directory conventions; when triaging downloads; when preventing cross-agent overwrites; or when standardizing file placement and lifecycle rules for reusable agent setups.
git-backed-obsidian-cli-workflows
Use the official Obsidian CLI for note workflows in a Git-backed vault, including search, read, links/backlinks-style queries, daily-note operations, and lightweight note writes that auto-sync after successful write operations. Use when the official Obsidian CLI is already installed and usable on any supported environment, and the task is about querying or updating notes in an Obsidian vault with Git-backed backup behavior.
github-private-repo-ssh-routing
Diagnose and manage SSH keys, host aliases, and Git remotes for GitHub private repositories in multi-repo environments. Use when deploy keys collide, a machine manages multiple private repos, automation or backup scripts push to GitHub, or errors like "Permission denied (publickey)" / "Repository not found" appear despite the repo existing.