git-worktree
Featured管理 Git worktree,在项目平级的 ../.zcf/项目名/ 目录下创建,支持智能默认、IDE 集成和内容迁移
AI & Automation 6,083 stars
421 forks Updated 1 weeks ago MIT
Install
Quality Score: 92/100
Stars 20%
Recency 20%
Frontmatter 20%
Documentation 15%
Issue Health 10%
License 10%
Description 5%
Skill Content
# Claude Command: Git Worktree
管理 Git worktree,支持智能默认、IDE 集成和内容迁移,使用结构化的 `../.zcf/项目名/` 路径。
直接执行命令并提供简洁结果。
---
## Usage
```bash
# 基本操作
/git-worktree add <path> # 从 main/master 创建名为 <path> 的新分支
/git-worktree add <path> -b <branch> # 创建指定名称的新分支
/git-worktree add <path> -o # 创建并直接用 IDE 打开
/git-worktree list # 显示所有 worktree 状态
/git-worktree remove <path> # 删除指定的 worktree
/git-worktree prune # 清理无效 worktree 记录
# 内容迁移
/git-worktree migrate <target> --from <source> # 迁移未提交内容
/git-worktree migrate <target> --stash # 迁移 stash 内容
```
### Options
| 选项 | 说明 |
| ------------------ | -------------------------------------------- |
| `add [<path>]` | 在 `../.zcf/项目名/<path>` 添加新的 worktree |
| `migrate <target>` | 迁移内容到指定 worktree |
| `list` | 列出所有 worktree 及其状态 |
| `remove <path>` | 删除指定路径的 worktree |
| `prune` | 清理无效的 worktree 引用 |
| `-b <branch>` | 创建新分支并检出到 worktree |
| `-o, --open` | 创建成功后直接用 IDE 打开(跳过询问) |
| `--from <source>` | 指定迁移源路径(migrate 专用) |
| `--stash` | 迁移当前 stash 内容(migrate 专用) |
| `--track` | 设置新分支跟踪对应的远程分支 |
| `--guess-remote` | 自动猜测远程分支进行跟踪 ...
Details
- Author
- UfoMiao
- Repository
- UfoMiao/zcf
- Created
- 1 years ago
- Last Updated
- 1 weeks ago
- Language
- TypeScript
- License
- MIT
Integrates with
Similar Skills
Semantically similar based on skill content — not just same category
AI & Automation Listed
worktree
创建 Git worktree 用于隔离开发新功能或修复 bug。 自动处理分支创建、worktree 设置、目录切换和开发环境初始化。
0 Updated 1 months ago
l8ai-cn Data & Documents Listed
worktree
由用户主动调用,用于多功能并行开发
6 Updated today
beixiyo Code & Development Solid
git-worktree
Manage Git worktrees for isolated parallel development. Use when creating, listing, switching, or cleaning up git worktrees, or when needing isolated branches for concurrent reviews or feature work.
41 Updated 3 days ago
iliaal