Loading...
Loading...
Check, create, and manage Git worktrees for parallel branch development. Suitable for scenarios such as batch-creating worktrees based on local branch patterns, placing worktrees in directories at the same level as the repository, avoiding duplicate worktree creation for branches already checked out in other directories, verifying branch-to-worktree path mappings, or preparing isolated workspaces before making modifications across multiple branches.
npx skill4agent add henryzhuhr/skills git-worktree-helpergit branch --list '<pattern>'git branch -r --list 'origin/<pattern>'git worktree list --porcelain<repo-name>-worktrees/~/path/to/
├── repo/ # Current project path
└── repo-worktrees/
├── skill~git-worktree/ # Corresponding to [skill] development branch skill/git-worktree
└── feature~login/ # Corresponding to [feature] development branch feature/loginBy default,is used instead of~to reduce the risk of path collisions when hyphens/in the original branch name are involved.-
skill/git-worktreerepo-worktrees/skill~git-worktreefeature/loginrepo-worktrees/feature~loginbranch -> target_pathgit worktree add <path> <branch>git worktree add <path> <branch>git branch --list 'skill/*'
git branch -r --list 'origin/skill/*'
git worktree list --porcelain
git worktree add /path/to/repo-worktrees/skill~git-worktree skill/git-worktree
git worktree add /path/to/repo-worktrees/feature~login feature/logingit worktree list --porcelaingit -C <worktree-path> branch --show-currentcreatedskippedfailed/conflictedprune