Files
24kycj 88c6ce8ccc 重构 monorepo 并完善网页端订阅与首页体验
- 迁移为 frontend-web、frontend-electron、backend-web 与 docker 部署结构
- 网页端:订阅门禁二次弹窗、套餐/支付组件化、顶栏分组对齐
- 首页:最近文件与模板库布局优化,缩略图对齐,下载与删除操作
- 新增管理后台、支付与云端文件 API,更新 README 与项目规范

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-06-08 18:17:39 +08:00

20 lines
1.5 KiB
Plaintext
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
---
description: 仅在用户明确要求时 git commit;安全协议
alwaysApply: true
---
# Git commit
- 仅当用户在当前对话中明确要求创建 commit 时才提交;若含糊先问。用户未要求 commit 则不要提交。
- 禁止:`git config` 任何修改。
- 禁止:未获用户明确要求的破坏性命令(如 `push --force`、`reset --hard` 等)。
- 禁止:跳过 hooks`--no-verify`、`--no-gpg-sign` 等)除非用户明确要求。
- 禁止:`git push --force` 到 `main`/`master`;若用户要求则先警告。
- 避免 `git commit --amend`。仅当同时满足:用户明确要求 amend,或 commit 成功但 hook 自动改了文件需纳入;且 HEAD 为你本会话所建;且未 push`git status` 显示 ahead 且未 push)——才 amend。commit 失败或被 hook 拒绝:禁止 amend,修问题后新建 commit。已 push:禁止 amend(除非用户明确要求并知悉需 force)。
- 禁止:`git` 带 `-i` 的交互命令。
- 无改动则不要空 commit。
- 不要 stage/提交明显密钥文件(`.env`、`credentials.json` 等);用户若坚持提交须警告。
- 创建 commit 时并行执行:`git status`、`git diff`staged+unstaged)、`git log`(看消息风格);该阶段除 git 外不要用其它命令读仓库/扫代码;分析后写 message;再顺序:`git add` 相关文件 → `git commit` → `git status` 校验。
- commit message 用 HEREDOC 传入(示例):`git commit -m "$(cat <<'EOF'\n...\nEOF\n)"`。
- 禁止:用户未明确要求则不要 `git push`。