Skip to main content

git-wt

Manages worktree lifecycle operations through git-wt without replacing an existing linked worktree. Use when creating, switching, listing, renaming, or deleting worktrees.

Quellinformationen

Repository
ryoppippi/dotfiles
Letzte Quellaktivität
20. Juni 2026 um 15:02
Erkannte Sprache von SKILL.md
Englisch
Sterne
268
Forks
5

Installationsoptionen

Standardmäßig ist der Prompt ausgewählt, der zuerst die Quelle prüft. Sie können zu einem direkten Befehl wechseln oder eine lokale Kopie herunterladen.

Quelldateien prüfen

Lesen Sie SKILL.md und alle von SkillsMP angezeigten Begleitdateien, bevor Sie sich für eine Installation entscheiden.

SKILL.md wird angezeigt

SKILL.md
Quellanweisungen · Schreibgeschützte Vorschau
name
git-wt
description
Manages worktree lifecycle operations through git-wt without replacing an existing linked worktree. Use when creating, switching, listing, renaming, or deleting worktrees.
# Git Worktrees with git-wt Use `git wt` for worktree lifecycle operations. Do not use raw `git worktree add`, `remove`, `move`, or `prune` when `git-wt` can perform the operation. ## Current Worktree Detection Before creating or switching worktrees, compare these paths: ```sh git rev-parse --path-format=absolute --git-dir git rev-parse --path-format=absolute --git-common-dir ``` Different paths mean the current directory is already inside a linked worktree. Continue in that worktree unless the user explicitly requests a different one. Do not create or select another worktree merely to satisfy an isolation convention. Equal paths mean the current directory is the main worktree. Create or select a linked worktree only when the task or user actually requires isolation. ## Workflow 1. Detect whether the current directory is already a linked worktree. 2. If a lifecycle operation is needed, confirm the command is available with `git-wt --version`. 3. Inspect existing worktrees with `git wt --json | jq`. 4. Create or select a worktree with `git wt --nocd <branch-or-worktree>`. Add a start point when needed: `git wt --nocd <branch-or-worktree> <start-point>`. 5. Treat the printed path as the worktree root and use it as the working directory for subsequent commands. Do not rely on shell directory changes persisting between tool calls. 6. Verify the branch and status inside the selected worktree before editing: `git branch --show-current` and `git status --short`. Use `git wt -b <branch> --nocd <worktree>` when the worktree directory and branch names should differ. ## Destructive Operations - Delete safely with `git wt -d <branch-or-worktree>`. - Use `git wt -D <branch-or-worktree>` only when the user explicitly requests forced deletion or safe deletion fails and discarding the work is confirmed. - Rename safely with `git wt -m [<old>] <new>`. - Use `git wt -M [<old>] <new>` only when overwrite or force behaviour is explicitly required. - Inspect `git status --short` in the target worktree before deleting or force-renaming it. Run `git-wt --help` for flags and configured behaviour when the requested operation is not covered above.
Auf GitHub ansehen