team-worktree
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseTeam Worktree
团队 Worktree
Before finalizing prose you author, read the writing standards.
Create one isolated git worktree per involved repo, all on branch , without touching any main working tree: the home repo in single-repo mode (default), or every repo in when it exists.
<id>docs/plans/<id>/4-repos.md在最终确定你撰写的文字之前,请阅读写作规范。
为每个涉及的仓库创建一个隔离的 Git worktree,全部使用 分支,且不得修改任何主工作树:在单仓库模式(默认)下使用 home repo;当 存在时,则为其中列出的每个仓库创建 worktree。
<id>docs/plans/<id>/4-repos.mdCore contracts
核心约定
- Detect a linked checkout with and
git rev-parse --git-dir.git rev-parse --git-common-dir - Non-default branch in an existing linked checkout → skip worktree creation for this repo.
- Default branch → report and stop.
- Single-repo: . Each
git worktree add .claude/worktrees/<branch>entry:4-repos.md.git -C <repo> worktree add .claude/worktrees/<branch> - Record every created path under in
## Worktrees.4-repos.md
- 使用 和
git rev-parse --git-dir检测关联 checkout。git rev-parse --git-common-dir - 现有关联 checkout 位于非默认分支 → 跳过为此仓库创建 worktree。
- 位于默认分支 → 报告并停止。
- 单仓库模式:。每个
git worktree add .claude/worktrees/<branch>条目:4-repos.md。git -C <repo> worktree add .claude/worktrees/<branch> - 在 的
4-repos.md下记录每个已创建的路径。## Worktrees
Procedure references
流程参考
Read each reference completely when reaching it, in order; later stages depend on earlier state and gates.
- Input
- Detect mode
- Detect existing worktree
- Execution
到达每个步骤时,按顺序完整阅读对应的参考文档;后续阶段依赖先前阶段的状态和关卡。
- 输入
- 检测模式
- 检测现有 worktree
- 执行