using-git-worktrees
在开始需要与当前工作区隔离的功能开发时,或在执行实施计划之前使用——创建隔离的 git 工作树,具备智能目录选择和安全验证
机器翻译查看英文原文
Use when starting feature work that needs isolation from current workspace or before executing implementation plans - creates isolated git worktrees with smart directory selection and safety verification
适用对象:软件开发与测试。自动收录 · 待核查。
原作者说明节选
从固定版本的 SKILL.md 提取,保留原文语言。以下内容属于作者说明,本站尚未验证安装、兼容或运行结果。
查看英文原文
原文涵盖的主题
- Using Git Worktrees
- Overview
- Directory Selection Process
- 1. Check Existing Directories
- 2. Check CLAUDE.md
- 3. Ask User
- Safety Verification
- For Project-Local Directories (.worktrees or worktrees)
Git worktrees create isolated workspaces sharing the same repository, allowing work on multiple branches simultaneously without switching. Core principle: Systematic directory selection + safety verification = reliable isolation. Announce at start: "I'm using the using-git-worktrees skill to set up an isolated workspace." Follow this priority order: If found: Use that directory. If both exist, .worktrees wins. If preference specified: Use it without asking. If no directory exists and no CLAUDE.md preference: MUST verify directory is ignored before creating worktree: If NOT ignored: Per Jesse's rule "Fix broken things immediately": 1. Add appropriate line to .gitignore 2. Commit the change 3. Proceed with worktree creation Why critical: Prevents accidentally committing worktree contents to repository. No .gitignore verification needed - outside project entirely. Auto-detect and run appropriate setup: Run tests to ensure worktree starts clean: If tests fail: Report failures, ask whether to proceed or investigate. If tests pass: Report ready. | Situation | Action | |-----------|--------| | .worktrees/ exists | Use it (verify ignored) | | worktrees/ exists | Use it (verify ignored) | |
这里只展示节选,请以完整原文和当前要求为准。
- 来源仓库
- davila7/claude-code-templates
- 源文件
- cli-tool/components/skills/development/using-git-worktrees/SKILL.md
- 固定版本
- 21be197f100a12b8d0dd9a211cc244c8179f84d3
来源与内容状态
本条为自动发现的元数据,尚未完成人工文档核查;适用性与运行结果待核查。
原作者:davila7/claude-code-templates · 原作者仓库元数据。文档核查:未核查。最近来源检查:2026-11-09T14:01:44.856Z。
分类由名称、说明与路径规则生成,分类不代表已核实适配。
许可与权利归属
MIT。第三方内容及版权归原作者,使用条件以原文为准。
许可原文 ↗本站没有因同步、复制或用户自报成功而将资源标为运行验证通过。
限制与注意事项
- 元数据收录不代表本站已经安装、适配、实测或进行安全审查。