docs: add destructive git operation safety rules
- Never run destructive ops (reset --hard, rm, checkout/restore) without explicit user instruction - Never amend commits without explicit written approval 💘 Generated with Crush Assisted-by: GLM-5 via Crush <crush@charm.land>
This commit is contained in:
@@ -326,6 +326,8 @@ git push origin main
|
||||
- **Delete unused/obsolete files** when refactors or feature removals make them irrelevant
|
||||
- **Quote git paths with brackets/parentheses** (e.g., `git add "src/app/[candidate]/**"`) to prevent shell glob/subshell expansion
|
||||
- **Use non-interactive git rebase** - set `GIT_EDITOR=: GIT_SEQUENCE_EDITOR=:` or pass `--no-edit` to avoid opening editors
|
||||
- **NEVER run destructive git operations** (`git reset --hard`, `rm`, `git checkout`/`git restore` to older commits) unless user gives explicit written instruction - treat as catastrophic
|
||||
- **NEVER amend commits** (`git commit --amend`) without explicit written approval from user
|
||||
- Update documentation when changing behavior
|
||||
- Follow existing code style
|
||||
- Use conventional commit messages
|
||||
|
||||
Reference in New Issue
Block a user