waynesutton

Gitrules โ€” Git skill for Claude Code

Git community

Critical Git Safety Protocol.

How to install Gitrules

Installs to ~/.claude/skills/waynesutton-markdown-site-gitrules/SKILL.md

Terminal
mkdir -p ~/.claude/skills/waynesutton-markdown-site-gitrules && curl -fsSL https://raw.githubusercontent.com/waynesutton/markdown-site/HEAD/.claude/skills/gitrules.md -o ~/.claude/skills/waynesutton-markdown-site-gitrules/SKILL.md

Restart Claude Code, or start a new session, for it to be picked up.

What Gitrules does

Critical Git Safety Protocol

**๐Ÿšจ NEVER USE `git checkout` TO REVERT CHANGES ๐Ÿšจ**

**MANDATORY GIT SAFETY RULES:**

  • NEVER run git checkout -- without first examining what you're about to destroy
  • ALWAYS use git diff 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 A

Alternatives in Git

Full documentation available on GitHub

View Source Repository