Skip to main content

switch-worktree

Switch the current session to work in an existing git worktree

Informações da origem

Repositório
dlt-hub/dlt
Última atividade na origem
18 de fevereiro de 2026 às 10:43
Idioma detectado do SKILL.md
inglês
Estrelas
6.024
Forks
637

Opções de instalação

Por padrão, está selecionado o prompt que primeiro revisa a origem. Você pode mudar para um comando direto ou baixar uma cópia local.

Revise os arquivos de origem

Leia o SKILL.md e os arquivos complementares exibidos pelo SkillsMP antes de decidir se vai instalar.

Exibindo SKILL.md

SKILL.md
Instruções da origem · Visualização somente leitura
name
switch-worktree
description
Switch the current session to work in an existing git worktree
argument-hint
<worktree-name>
# Switch to worktree Switch the current session to an existing worktree. ## Steps ### 1. Resolve the worktree If `$ARGUMENTS` is empty, list available worktrees and ask the user to pick one: ``` git worktree list ``` Otherwise, let `NAME` = `$ARGUMENTS`. The worktree path is `<repo-root>/.worktrees/<NAME>`. Verify the worktree exists in `git worktree list` output. If not, stop with an error. Let `WORKTREE` = the absolute path to the worktree. ### 2. Switch cwd ``` cd WORKTREE ``` Then verify the switch took effect: ``` pwd ``` If `pwd` does not show `WORKTREE`, stop with an error — the cwd did not persist. ### 3. Report ``` Switched to worktree: WORKTREE Branch: <current branch from git branch --show-current> ```
Ver no GitHub