switch-worktree

Switch the current working directory to a specified Git worktree.

Updated Feb 26, 2026
One-click install
npx skills add https://github.com/Thanhhuong0209/DLT-Normalization --skill switch-worktree
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: switch-worktree
Source: https://github.com/Thanhhuong0209/DLT-Normalization/tree/main/.claude/skills/switch-worktree
Command: npx skills add https://github.com/Thanhhuong0209/DLT-Normalization --skill switch-worktree

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill streamlines the process of navigating between different Git worktrees, allowing you to quickly switch your current working directory to a different branch or project context within the same repository.

Core Features & Use Cases

  • Seamless Context Switching: Instantly change your active directory to a pre-configured Git worktree.
  • Interactive Selection: If no worktree is specified, the Skill will list available worktrees and prompt you to choose one.
  • Use Case: You're working on a feature branch and need to quickly check something on the main branch, which is set up as a worktree. This Skill lets you jump between them without complex cd commands or manual Git operations.

Quick Start

Switch your current session to the 'develop' worktree.

Frequently Asked Questions about switch-worktree

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I switch between Git worktrees from the command line?

To switch Git worktrees, you specify a target worktree name and the directory changes automatically. If no name is provided, available worktrees are listed for interactive selection to verify the directory change.

What is a Git worktree and when do I need it for version control?

A Git worktree lets you maintain multiple concurrent working directories linked to the same repository. You need it to manage separate branches simultaneously without stashing changes or cloning the repository again.

Can I list all available Git worktrees before switching directories?

Yes, you can list available Git worktrees before switching directories. If you execute the switch command without specifying a target worktree, the tool automatically lists all available options for you to choose from.

Do I need Git installed to use worktrees for managing multiple branches?

Yes, you need Git installed and properly configured on your system to create and switch worktrees. Worktrees are a native Git feature, so the underlying version control system must be present and set up for your repository.

What is the best way to juggle context switching between a feature branch and main?

The best way to handle context switching between branches is using Git worktrees. They allow you to instantly jump to a pre-configured working directory for main or develop without complex cd commands or manual Git operations.

Why does my Git worktree directory switch fail to verify?

A Git worktree directory switch fails to verify if the specified worktree path does not exist or Git is not configured correctly. Ensure the worktree is properly set up and the target directory is valid before switching.