/workspace/main-repo ← 主仓库(main 分支)
/workspace/main-repo-feature-a ← main-repo 的需求 A
/workspace/main-repo-bugfix-c ← main-repo 的修复 C
/workspace/other-repo-feature-d ← other-repo 的需求 D
规则:前缀 = 仓库名,后缀 = 需求标识。
从目录名解析:main-repo-feature-a → 仓库 main-repo,需求 feature-a
> 目录名不规范时,通过 git remote -v 确认归属。
git branch
git status
git log -5 --oneline
⚠️ 脏工作区先提醒,不覆盖未提交内容。
优先读取:TASK.md / README.md / ARCH.md / 构建文件(go.mod、pom.xml 等)。
| 允许 ✅ | 禁止 ❌ |
|---|---|
| --------- | --------- |
| 当前目录开发当前需求 | 切换其他 worktree 目录 |
| 当前分支提交代码 | 修改其他需求代码 |
| 分析当前目录代码 | 操作其他仓库/分支 |
| 从目录名解析归属 | git reset --hard / clean -fd(除非要求) |
最后更新: 2026-04-20
共 1 个版本