git-worktree

Manage Git worktrees across multiple branches with add, remove, and prune commands.

103|6|Updated Aug 2, 2025
One-click install
npx skills add https://github.com/n0an/VivaDicta --skill git-worktree-n0an
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: git-worktree
Source: https://github.com/n0an/VivaDicta/tree/main/.claude/skills/git-worktree
Command: npx skills add https://github.com/n0an/VivaDicta --skill git-worktree-n0an

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Git worktrees let you work on multiple branches simultaneously without switching, saving time and avoiding messy setups.

Core Features & Use Cases

  • List existing worktrees
  • Create a new worktree for existing branch: git worktree add <path> <branch-name>
  • Create a new worktree for new branch: git worktree add -b <new-branch> <path> <base-branch>
  • Remove a worktree: git worktree remove <worktree-path>
  • Prune stale worktrees: git worktree prune

Quick Start

Create a new worktree for a feature branch at a specified path and then run git worktree list to verify the setup.

Frequently Asked Questions about git-worktree

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

FAQPage Schema
How do I work on multiple git branches simultaneously without switching?

To create a git worktree for a new branch, run git worktree add -b <new-branch> <path> <base-branch>. This checks out a new branch into a separate directory, letting you work on features simultaneously without stashing your current branch state.

How do I list and verify existing git worktrees in my repository?

You can list existing git worktrees by running git worktree list. This command verifies your worktree setup and displays all active working directories associated with your local repository branches.

Can I check out the same git branch in multiple worktrees at the same time?

No, checking out the same branch in multiple git worktrees is not allowed. This restriction enforces safe usage by preventing conflicting changes and ensures repository integrity across simultaneous branch workflows.

How do I remove a git worktree and clean up stale working directories?

To remove a git worktree, use git worktree remove <worktree-path>. For stale or deleted worktree directories, run git worktree prune to clean up administrative files and maintain a healthy repository state.