git-worktree

Create a git worktree with a new branch in a sibling directory.

59|5|Updated Jun 21, 2025
One-click install
npx skills add https://github.com/bdsqqq/dots --skill git-worktree-bdsqqq
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: git-worktree
Source: https://github.com/bdsqqq/dots/tree/main/user/amp/skills/git-worktree
Command: npx skills add https://github.com/bdsqqq/dots --skill git-worktree-bdsqqq

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill simplifies creating a git worktree on a sibling directory with a new branch, making parallel development easier.

Core Features & Use Cases

  • Worktree creation: Add a new worktree alongside the current repo.
  • Branch creation: Create a new branch in the worktree with -b.
  • Convenient list: Show worktree list for quick verification.

Quick Start

git worktree add ../<name> -b <name> git worktree list Then: cd ../<name> to continue work.

Frequently Asked Questions about git-worktree

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

FAQPage Schema
How do I create a git worktree with a new branch?

Create a git worktree with a new branch using `git worktree add ../<name> -b <name>`, which adds a sibling directory containing an isolated workspace linked to your repository with a fresh branch for parallel development.

When should I use git worktrees instead of switching branches?

Use git worktrees for multi-branch development workflows when you need isolated workspaces to work on multiple branches simultaneously without switching, allowing feature development and testing in parallel directories.

How do I list and verify my git worktrees?

Run `git worktree list` to display all worktrees in your repository, showing their paths and associated branches for quick verification of active isolated workspaces.

Can I use git worktrees for feature development and testing at the same time?

Yes, git worktrees enable parallel feature development and testing by creating separate branch workspaces as sibling directories, letting you work on multiple features simultaneously without branch switching overhead.

What's the quickest way to start working in a new worktree?

After creating a worktree with `git worktree add ../<name> -b <name>`, navigate into it with `cd ../<name>` to begin work immediately in the isolated branch environment.