EvoX 文件
  • 產品
  • 價格
  • 文件
  • 能力市集
返回 EvoMap
登入註冊
概览
实践案例
功能
配置
开发者
开发工作流
在项目中开发代码审阅与变更处理集成终端Git worktree
扩展开发
编写技能接入 MCP 工具Hooks
经验与协议集成
GEP 数据结构蒸馏 Gene、Skill 与 RecipeRecipe 与经验复用Evolver Proxy 与 MCP同步、导入与导出A2A 与任务网络接入
独立 Evolver
安装与首次运行审查与验证持续运行与任务队列身份与连接进化策略与边界资产发布与积分存储、容器与 CI
架构与源码仓库
安全
管理
概览
实践案例
功能
配置
开发者
开发工作流
在项目中开发代码审阅与变更处理集成终端Git worktree
扩展开发
编写技能接入 MCP 工具Hooks
经验与协议集成
GEP 数据结构蒸馏 Gene、Skill 与 RecipeRecipe 与经验复用Evolver Proxy 与 MCP同步、导入与导出A2A 与任务网络接入
独立 Evolver
安装与首次运行审查与验证持续运行与任务队列身份与连接进化策略与边界资产发布与积分存储、容器与 CI
架构与源码仓库
安全
管理
EvoX 文件/Build with EvoX/Git worktree

Git worktrees

Git worktrees provide separate directories and checked-out branches for one repository, making them useful for parallel tasks. They share Git objects, not one freely writable checkout. Processes, ports, and dependencies require their own isolation.

Choose a source

Identify the parent workspace, path, and branch in the project's worktree list before creating a child. Parent-child metadata organizes tasks; verify the actual directory, branch, and files.

Record the source state first:

bash
git status --short --branch
git worktree list

Determine which uncommitted files the task needs. Creating a worktree does not prove those files were copied; check its inputs after entering the new directory.

Verify creation

  1. Enter a task-specific name and submit one creation request.
  2. Wait for its result and check the returned path, branch, and relationship.
  3. Open a new session only in the confirmed directory.
  4. Check dependencies, environment, build output, and service ports before working.

Closing the creation dialog does not cancel background creation. For a pending or unknown outcome, inspect the original request through the result-check action instead of repeatedly creating directories.

Distinguish creation from relationship state

ResultAction
CreatedInspect the actual directory, then open a session
Directory created but relationship save failedCheck directory and Git state, then repair the relationship without creating another directory
Failed without a committed creation resultUse the retry action provided by the UI
Unknown result or changed instanceInspect the original request and current list before assuming success or failure

Verify request state and directory state separately. Retrying must not overwrite a successfully created workspace.

Work in isolation

Use a terminal scoped to each worktree. Allocate separate development ports and inspect dependency links, environment files, and local databases. Directory separation alone does not isolate runtime resources.

Before sharing identity, credentials, or writable data, establish ownership and concurrency rules. Do not copy an entire user checkout to move a task or include another worktree's artifacts in a commit.

Example: isolate an interface fix

The parent project contains unfinished feature work and a menu needs an independent fix. Run git worktree list in the parent and check its branch, then create a child named menu-fix through the project's worktree entry. The relationship name organizes tasks; the actual branch and directory come from the creation result.

In the returned directory, run:

bash
git rev-parse --show-toplevel
git branch --show-current
git status --short --branch

Confirm the separate directory and required source, then prepare dependencies according to the repository instructions. Uncommitted parent work must not silently become task input. Use a separate server port without stopping the parent's service.

After the fix, review and deliver from the child directory, then verify that parent edits and services remain intact. Transfer commits through the repository's merge or PR process; copying the entire workspace is not code integration.

Finish and clean up

Review, verify, and deliver the changes through the project's process before removing a directory. Check uncommitted files, unpushed commits, untracked artifacts, and running processes. Closing a task window or archiving a chat does not establish that work has been saved.

See Develop in a project for acceptance steps.

Remove a working directory through Git

After preserving needed files and commits and accounting for processes, inspect and remove the completed worktree from another working directory:

bash
git worktree list
git worktree remove /absolute/path/to/completed-worktree

Replace the example path with the verified directory. If Git refuses removal because of changes, preserve or resolve them before continuing, without adding force options. Manually deleting a directory does not reconcile project relationship records.

上一篇集成终端下一篇编写技能