Critical rules for git operations. Enforces git unstage, git undo, and git stash push/apply usage. MUST ALWAYS be applied when performing git operations like staging, unstaging, undoing commits, or stashing changes.
Install
npx skillscat add totto2727-dotfiles/agents/git-operations-rules Install via the SkillsCat registry.
Git Operations Rules
Rule (CRITICAL)
These rules MUST ALWAYS be followed when performing git operations.
git -C
Do not use git -C <path>. Always cd to the repository directory first, or use absolute paths within the current working directory.
git unstage
Use git unstage to reset the staging area. Do not pass any options.
git unstagegit undo
Use git undo to undo the last commit. Do not pass any options.
git undogit stash
Do not use shorthand. Use explicit commands:
- To save changes:
git stash push(notgit stash) - To restore:
git stash apply(notgit stash pop)
Before stashing, stage any new (untracked) files with git add so they are tracked; otherwise they will not be included in the stash.
git add <new-files>
git stash push -m "<message>" -- <paths>Related Skills
- git-commit - Use when creating git commits
- file-deletion-rules - Use when deleting files