
Gitrules
- 2 installs
- 627 repo stars
- Updated May 20, 2026
- waynesutton/markdown-site
Enforces git safety rules to prevent destructive operations, notably never using git checkout to revert and instead diffing and manually undoing changes.
About
This skill defines git safety rules that prohibit blindly using git checkout to revert and require diffing before discarding work. A developer uses it whenever performing git operations, reverting changes, or undoing commits to avoid losing valuable work.
- Never run git checkout -- <file> without examining what is lost
- Manually undo specific problematic sections instead of blanket reverts
Gitrules by the numbers
- 2 all-time installs (skills.sh)
- +1 installs in the week ending Aug 5, 2026 (Skillselion tracking)
- Ranked #498 of 733 Git & Pull Requests skills by installs in the Skillselion catalog
- Data as of Aug 5, 2026 (Skillselion catalog sync)
npx skills add https://github.com/waynesutton/markdown-site --skill gitrulesAdd your badge
Show developers this skill is listed on Skillselion. Paste this into your README.
| Installs | 2 |
|---|---|
| repo stars | ★ 627 |
| Last updated | May 20, 2026 |
| Repository | waynesutton/markdown-site ↗ |
What it does
Enforces git safety rules to prevent destructive operations, notably never using git checkout to revert and instead diffing and manually undoing changes.
Files
Critical Git Safety Protocol
NEVER USE git checkout TO REVERT CHANGES.
MANDATORY GIT SAFETY RULES:
- NEVER run `git checkout -- <file>` without first examining what you're about to destroy
- ALWAYS use `git diff <file>` to see exactly what changes will be lost
- MANUALLY undo changes by editing files to revert specific problematic sections
- Preserve valuable work: if user says changes are bad, ask which specific parts to revert
- `git checkout` destroys ALL changes: this can eliminate hours of valuable progress
- When user asks to "undo" changes: Read the current file, identify problematic sections, and manually edit to fix them
Why this matters: Using git checkout blindly can destroy sophisticated implementations, complex prompts, provider-specific logic, and other valuable work that took significant time to develop.
Git Safety Rules
NEVER run these commands without explicit user approval:
git reset --hard: Destroys uncommitted changes permanentlygit checkout -- .: Discards all working directory changesgit clean -fd: Deletes untracked files permanentlygit stash drop: Deletes stashed changes
ALWAYS before any git operation:
1. Run git status first to check for uncommitted changes 2. If there are uncommitted changes, STOP and ASK the user before proceeding 3. Suggest git stash to preserve changes if needed 4. Never create a commit unless the user explicitly asked for one
If user asks to "revert" something:
1. First clarify: revert committed changes or uncommitted changes? 2. Show what will be affected before doing anything 3. Get explicit confirmation for destructive operations
This rule exists because careless git operations destroyed 2 days of work.