Gestion des Git Worktrees

VérifiéSûr

Gère les worktrees git via un script dédié (bin/worktree). Permet de créer, lister, supprimer ou naviguer entre les worktrees pour un développement parallèle isolé. Convertit les descriptions de tâches en noms de branches avec une convention de nommage cohérente.

Spar Skills Guide Bot
DeveloppementIntermédiaire
7002/06/2026
Claude CodeCursorWindsurf
#git#worktree#parallel-development#branching

Recommandé pour

Notre avis

Crée et gère des worktrees Git pour travailler sur plusieurs branches en parallèle sans conflit.

Points forts

  • Permet d'isoler chaque branche dans son propre répertoire
  • Supprime le besoin de stash ou de commits temporaires
  • Facilite les tests simultanés de plusieurs fonctionnalités

Limites

  • Nécessite l'outil externe 'bin/worktree' ou une connaissance des commandes Git natives
  • Les worktrees ne partagent pas l'index ni la staging area
Quand l'utiliser

Lorsque vous devez travailler sur plusieurs branches en même temps, par exemple pour développer une fonctionnalité tout en corrigeant un bug urgent.

Quand l'éviter

Si vous préférez un flux de travail linéaire avec une seule copie du dépôt, ou si l'espace disque est limité.

Analyse de sécurité

Sûr
Score qualité88/100

The skill only uses git worktree commands and a custom script restricted to those operations. No destructive, exfiltrating, or obfuscated actions are performed. The allowed tools are limited to safe Bash commands for worktree management.

Aucun point d'attention détecté

Exemples

Create worktree for new feature
Create a worktree for adding user notifications
Create worktree for bugfix
Set up a worktree for branch bugfix/login-issue
List all worktrees
Show me my worktrees

name: worktree description: Create and manage git worktrees for parallel development. Use when the user wants to create a worktree, work on a feature in isolation, set up a new branch with its own directory, or manage existing worktrees. allowed-tools: Bash(bin/worktree:), Bash(git worktree:)

Git Worktree Management

Manage git worktrees using the bin/worktree script for parallel development workflows.

Available Commands

bin/worktree list              # Show all worktrees
bin/worktree create <branch>   # Create worktree for branch
bin/worktree delete <branch>   # Remove worktree
bin/worktree go <branch>       # Print path (for cd)

Naming Convention

Worktrees are created as sibling directories to the main repo. Slashes become dashes:

| Branch | Directory | |--------|-----------| | feature/auth | ../jolly-blitzen-feature-auth | | bugfix/login | ../jolly-blitzen-bugfix-login | | experiment/new-ui | ../jolly-blitzen-experiment-new-ui |

Instructions

When creating a worktree:

  1. If user provides a branch name (contains /), use it directly
  2. If user provides a task description, convert to feature/<kebab-case-description>
  3. Run bin/worktree create <branch>
  4. Tell the user the path and how to switch: cd <path>

When listing worktrees:

Run bin/worktree list and present the results.

When deleting a worktree:

  1. Confirm the branch name with the user if ambiguous
  2. Run bin/worktree delete <branch>

Examples

User: "Create a worktree for adding user notifications"

bin/worktree create feature/user-notifications

User: "Set up a worktree for branch bugfix/login-issue"

bin/worktree create bugfix/login-issue

User: "Show me my worktrees"

bin/worktree list

User: "Remove the notifications worktree"

bin/worktree delete feature/user-notifications
Skills similaires