LeslieWylie/dsh-checkout-guard

LeslieWylie★ 0JavaScriptLast synced: 2026-08-17

Open on GitHub

Pre-flight guard for git working copies: is the checkout you are about to write to the one you think it is? Branch identity, drift from the remote and how stale that figure is, the identity your next commit will carry, work already in the index, and duplicate clones. Read-only, offline by default.

README excerpt

dsh-checkout-guard Is the working copy you are about to write to the one you think it is? A DSH plugin that answers that before you edit, commit, or push — not after. It reads a git checkout and tells you where it sits relative to its remote, how stale that answer is, who your next commit will be attributed to, what work is already sitting in the index, and whether another clone of the same repository on this machine has moved ahead of the one you are in. Read-only. Offline unless you ask for a fetch. Never takes the index lock. Why Every check here exists because a specific mistake actually happened, usually to an agent working across many repositories at once: What goes wrong What you see afterwards You edit a checkout that is 8 commits behind Your "fix" reverts work, or your push is rejected after the fact Two clones of one repository, you are in the stale one Changes vanish; the repo on the forge never shows them A concurrent process moved HEAD to another branch Your commit lands on a branch you have never heard of Something was already staged before you ran git add Your commit packages somebody else's work in progress No repository-local user.email A work address is permanentl…

View full README on GitHub →
Agentsagent-safetydeepseek-harnessdshdsh-plugingitpre-flightagent

Category