git-worktree

Create Git worktrees for parallel branch development with shared settings.

4|1|Updated Nov 9, 2023
One-click install
npx skills add https://github.com/sh1ma/blog --skill git-worktree-sh1ma
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: git-worktree
Source: https://github.com/sh1ma/blog/tree/main/.claude/skills/git-worktree
Command: npx skills add https://github.com/sh1ma/blog --skill git-worktree-sh1ma

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Git worktreeを使った並列開発を支援する。複数の Claude Codeインスタンスで同時に異なるブランチの作業を行う際に使用する。"worktree"、"並列開発"、"別ブランチで作業"などのキーワードで発動。

Core Features & Use Cases

  • 複数ブランチ間で独立した作業スペースを作成できる
  • worktreeとブランチの組み合わせを安全に設定して共有設定を維持
  • ブランチ命名規則を遵守し、マルチブランチ作業を整然と管理

Quick Start

Create a new worktree for your feature branch and link its settings to the main repository as described.

Frequently Asked Questions about git-worktree

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

FAQPage Schema
How do I use Git worktree for parallel development across multiple branches?

Git worktree creates independent working directories for separate branches, allowing multiple instances to develop features simultaneously. This Skill coordinates branch creation, enforces naming conventions, and establishes symlinks to share configuration across all worktrees.

Can I share settings.local.json permissions across different Git worktrees?

Yes, you can share settings.local.json across Git worktrees by creating absolute-path symlinks to the main repository. This ensures MCP, command, and skill permissions remain consistent across every parallel development instance.

What is the best way to manage multiple Claude Code instances working on separate features?

Managing multiple Claude Code instances is best handled through Git worktree parallel development. This approach isolates each feature branch in its own working directory while enforcing branch naming conventions and sharing configuration via symlinks.

Does Git worktree branch management require specific configuration to maintain shared settings?

Git worktree branch management requires mandatory symbolic links to settings.local.json in the main repository. This configuration step guarantees that shared MCP and command permissions propagate correctly to all worktrees.

Why do I need absolute-path symlinks when setting up Git worktrees for parallel work?

Absolute-path symlinks are needed for Git worktrees because they securely link settings.local.json from the main repository to each worktree. This maintains shared permissions and prevents configuration drift across parallel branches.

When should I avoid using Git worktree for multi-branch workflows?

You should avoid Git worktree if your workflow does not require running multiple Claude Code instances simultaneously. Without the need for isolated parallel branch development and shared settings via symlinks, standard branch switching is sufficient.