Loading...
Loading...
Compare original and translation side by side
undefinedundefined
**如果找到:** 使用该目录。如果两者都存在,`.worktrees` 优先。
**If found:** Use that directory. If both exist, `.worktrees` takes precedence.grep -i "worktree.*director" CLAUDE.md 2>/dev/nullgrep -i "worktree.*director" CLAUDE.md 2>/dev/null未找到工作树目录。我应该在哪里创建工作树?
1. .worktrees/(项目本地,隐藏目录)
2. ~/.config/superpowers/worktrees/<project-name>/(全局位置)
你倾向哪个?No worktree directory found. Where should I create the worktree?
1. .worktrees/ (project-local, hidden directory)
2. ~/.config/superpowers/worktrees/<project-name>/ (global location)
Which do you prefer?undefinedundefined
**如果未被忽略:**
根据 Jesse 的规则"立即修复坏掉的东西":
1. 在 .gitignore 中添加相应条目
2. 提交更改
3. 继续创建工作树
**为什么这很关键:** 防止意外将工作树内容提交到仓库。
**If not ignored:**
Follow Jesse's rule "Fix broken things immediately":
1. Add the corresponding entry to .gitignore
2. Commit the changes
3. Proceed to create the worktree
**Why this is critical:** Prevent accidental commit of worktree content to the repository.project=$(basename "$(git rev-parse --show-toplevel)")project=$(basename "$(git rev-parse --show-toplevel)")undefinedundefinedundefinedundefinedundefinedundefinedundefinedundefinedundefinedundefined
**如果测试失败:** 报告失败情况,询问是否继续或排查。
**如果测试通过:** 报告就绪。
**If tests fail:** Report the failure and ask whether to continue or troubleshoot.
**If tests pass:** Report readiness.工作树已就绪:<full-path>
测试通过(<N> 个测试,0 个失败)
准备实现 <feature-name>Worktree ready: <full-path>
Tests passed (<N> tests, 0 failures)
Ready to implement <feature-name>| 情况 | 操作 |
|---|---|
| 使用它(验证已忽略) |
| 使用它(验证已忽略) |
| 两者都存在 | 使用 |
| 都不存在 | 检查 CLAUDE.md → 询问用户 |
| 目录未被忽略 | 添加到 .gitignore + 提交 |
| 基线测试失败 | 报告失败 + 询问 |
| 无 package.json/Cargo.toml | 跳过依赖安装 |
| Scenario | Action |
|---|---|
| Use it (verify ignored) |
| Use it (verify ignored) |
| Both exist | Use |
| Neither exists | Check CLAUDE.md → Ask user |
| Directory not ignored | Add to .gitignore + commit |
| Baseline tests fail | Report failure + ask |
| No package.json/Cargo.toml | Skip dependency installation |
git check-ignoregit check-ignore你:我正在使用 using-git-worktrees 技能来建立一个隔离的工作区。
[检查 .worktrees/ - 存在]
[验证已忽略 - git check-ignore 确认 .worktrees/ 已被忽略]
[创建工作树:git worktree add .worktrees/auth -b feature/auth]
[运行 npm install]
[运行 npm test - 47 个通过]
工作树已就绪:/Users/jesse/myproject/.worktrees/auth
测试通过(47 个测试,0 个失败)
准备实现 auth 功能You: I'm using the using-git-worktrees skill to set up an isolated workspace.
[Check .worktrees/ - exists]
[Verify ignored - git check-ignore confirms .worktrees/ is ignored]
[Create worktree: git worktree add .worktrees/auth -b feature/auth]
[Run npm install]
[Run npm test - 47 passed]
Worktree ready: /Users/jesse/myproject/.worktrees/auth
Tests passed (47 tests, 0 failures)
Ready to implement auth feature