Loading...
Loading...
Compare original and translation side by side
undefinedundefined
Each worktree is a complete, isolated copy of the codebase. All worktrees share git history but have independent working directories.
每个工作树都是代码库的完整独立副本。所有工作树共享Git历史记录,但拥有独立的工作目录。Use the Task tool to launch a general-purpose agent with:
- prompt: "Working in trees/feature-1, implement [plan]. Write a RESULTS.md summarising changes."
- run_in_background: true (for parallel execution)使用Task工具启动通用代理,参数如下:
- prompt: "在trees/feature-1目录中,实现[计划]。编写RESULTS.md文件总结更改。"
- run_in_background: true(用于并行执行)git worktree remove ./trees/feature-1
git worktree prunegit cherry-pick feature-2
# or merge the branch
git merge feature-2git worktree remove ./trees/feature-1
git worktree prunegit cherry-pick feature-2
# 或合并分支
git merge feature-2project/
├── trees/
│ ├── feature-1/ # Worktree 1 (full codebase copy)
│ │ └── RESULTS.md
│ ├── feature-2/ # Worktree 2 (full codebase copy)
│ │ └── RESULTS.md
│ └── feature-3/ # Worktree 3 (full codebase copy)
│ └── RESULTS.md
└── (main working directory)project/
├── trees/
│ ├── feature-1/ # 工作树1(完整代码库副本)
│ │ └── RESULTS.md
│ ├── feature-2/ # 工作树2(完整代码库副本)
│ │ └── RESULTS.md
│ └── feature-3/ # 工作树3(完整代码库副本)
│ └── RESULTS.md
└── (主工作目录)undefinedundefinedundefinedundefined