plover-git-safety

Diagnose and recover from concurrent git, worktree, and stacked-PR footguns in the Plover repo.

1|Updated May 24, 2026
One-click install
npx skills add https://github.com/tryplover/Plover --skill plover-git-safety-tryplover
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: plover-git-safety
Source: https://github.com/tryplover/Plover/tree/main/.claude/skills/plover-git-safety
Command: npx skills add https://github.com/tryplover/Plover --skill plover-git-safety-tryplover

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Concurrent git usage across sessions, subagents, worktrees, and multiple local checkouts produces misleading signals — commits landing on the wrong branch, "Merged" PRs that never shipped to main, and stash stacks tangled by subagents — that silently corrupt work. ## Core Features & Use Cases - Symptom-to-fix quick reference: Maps concrete error messages and symptoms (file-tool artifact-directory errors, HEAD swaps, line-ending churn, merge-async 403s) to exact recovery commands. - Subagent and worktree safety: Covers worktree isolation, node_modules symlinking for typecheck/lint, and preventing destructive git commands (stash, reset, clean) from parallel subagents in shared checkouts. - PR verification and stacked merges: Verifies whether a "Merged" PR actually reached main via base-branch and ancestor checks, and merges GitHub native stacked PRs bottom-up through the merge-async REST endpoint. - Use Case: A fix verified green on typecheck/lint/test still reproduces for the user after restarting pnpm dev — the skill directs you to confirm which checkout and branch the dev server is actually running from before re-diagnosing. ## Quick Start Use the plover-git-safety skill to figure out why my commit landed on the wrong branch and recover it safely.

Frequently Asked Questions about plover-git-safety

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I merge GitHub stacked PRs when gh pr merge fails?▼

Merge stacked PRs bottom-up using the asynchronous REST endpoint: gh api --method PUT repos/<owner>/<repo>/pulls/<n>/merge-async -f merge_method=squash. Poll gh pr view until state is MERGED, then fetch and verify the next child's base retargeted to main before merging it.

How do I verify a merged GitHub PR actually shipped to main?▼

Check the PR's base branch, not just its merged status: run gh pr view <n> --json baseRefName,mergeCommit, then git merge-base --is-ancestor <mergeCommit.oid> origin/main. A PR merged into a feature branch shows as Merged but never reaches main.

Why did my commit land on the wrong branch?▼

A concurrent actor in the same working directory checked out a different branch mid-task; a single checkout has one HEAD and the last checkout wins. Confirm via git reflog, then recover non-destructively with git cherry-pick onto the correct branch from an isolated worktree.

Can I recover a stash that a subagent popped or lost?▼

Yes, popped stashes survive as dangling commits until garbage collection. Enumerate them with git fsck --no-reflogs --unreachable, identify stash commits by their WIP on or On <branch> subjects, and restore files with git checkout <stash-sha> -- <path>.

Why does prettier dirty unrelated files with an empty diff on Windows?▼

The checkout has CRLF line endings while prettier writes LF, so git sees byte-level changes that normalize away in the diff. Restore the untouched files with git checkout -- <paths> and pass prettier an explicit file list instead of a directory glob.

How do I run typecheck in a fresh git worktree without a full pnpm install?▼

Symlink node_modules from the primary checkout into the worktree for both the root and app package, then run pnpm --filter ./app run typecheck. This works for typecheck, lint, and vitest, but do a real install before packaging or running native code.