git:worktrees

Manage multiple Git branches in separate working directories with shared object storage.

Updated Apr 6, 2026
One-click install
npx skills add https://github.com/luicabref97/sushi-jungle-web --skill git-worktrees-luicabref97
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: git:worktrees
Source: https://github.com/luicabref97/sushi-jungle-web/tree/main/.agents/skills/git-worktrees
Command: npx skills add https://github.com/luicabref97/sushi-jungle-web --skill git-worktrees-luicabref97

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill eliminates the need to stash changes or create separate clones when working on multiple branches by enabling simultaneous checkouts in separate directories, making context switches safe and fast while avoiding branch conflicts.

Core Features & Use Cases

  • Concurrent branch workspaces: Create linked worktrees to work on features, hotfixes, PR reviews, or experiments without disrupting your main checkout.
  • Administrative commands: Add, list, move, remove, lock, unlock, prune, and repair worktrees to manage lifecycle and recover from manual changes.
  • Selective integration: Compare files, cherry-pick commits, and selectively checkout or restore files across worktrees for precise merges and reviews.
  • Use Case: Spin up an isolated worktree to run long-running tests or review a pull request while continuing feature development in the main directory.

Quick Start

Create a new worktree for branch feature-x at ../feature-x, run the test suite there, and report any failing tests.

Frequently Asked Questions about git:worktrees

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

FAQPage Schema
How do I work on multiple git branches at the same time without stashing or cloning?

Git worktrees enable checking out multiple branches simultaneously in separate working directories. This allows safe, fast context switching for parallel development without needing to stash changes or create separate repository clones.

What is the best way to review a pull request without disrupting my current feature branch?

Creating an isolated git worktree lets you review a pull request in a separate directory. Your main checkout remains completely untouched, allowing you to continue feature development while testing or reviewing the PR in a parallel workspace.

How do I cherry-pick commits between branches using git worktrees?

Git worktrees share a single Git object database across all linked directories. You can selectively cherry-pick commits, compare files, and restore specific changes across worktrees for precise merges and code reviews without duplicating repository history.

Can I run long-running tests on a separate branch without blocking my main git workspace?

Yes, you can create a linked worktree to run long-running builds or test suites in an isolated directory. This prevents your main working directory from being blocked, allowing you to continue development while tests execute in the background.

How do I manage the lifecycle of git worktrees and recover from manual changes?

You can manage the worktree lifecycle using administrative commands to add, list, move, remove, lock, unlock, and prune worktrees. A repair command is also available to recover worktrees from manual changes and enforce branch lock constraints.

When should I lock a git worktree and what limitations should I consider?

Locking a git worktree prevents administrative pruning when a directory might be temporarily unavailable or on a removable drive. You should consider that all worktrees share the same underlying object database, meaning corruption in the main repository affects all linked checkouts.