sd-worktree

Create, rebase, merge, and clean git worktrees from the main repository.

2|2|Updated Jul 10, 2024
One-click install
npx skills add https://github.com/kslhunter/simplysm --skill sd-worktree
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: sd-worktree
Source: https://github.com/kslhunter/simplysm/tree/main/.claude/skills/sd-worktree
Command: npx skills add https://github.com/kslhunter/simplysm --skill sd-worktree

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Manages isolated feature work by creating and handling git worktrees, allowing developers to work on separate contexts without polluting the main branch.

Core Features & Use Cases

  • Create, rebase, merge, and clean worktrees from the main repository to maintain clean histories.
  • Automatically aligns worktree with the current main branch, enabling safe simultaneous development.
  • Use case: start a new feature in a dedicated worktree and later merge back with no conflicts.

Quick Start

From the main repository, run the add command to create a new worktree and then switch into it to begin feature work.

Frequently Asked Questions about sd-worktree

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

FAQPage Schema
How do I isolate feature work with git worktrees?

You can isolate feature work with git worktrees by running an add command from the main repository to create a dedicated worktree, then switching into it to begin development. This prevents polluting the main branch context.

What is the best way to manage multiple git branches without switching context?

Using git worktrees is the best way to manage multiple branches without switching context, allowing developers to work on separate features simultaneously in isolated directories while maintaining clean histories.

How do I rebase and merge a git worktree back to the main branch?

To rebase and merge a git worktree back to the main branch, the workflow automatically aligns the worktree with the current main branch and executes deterministic merge commands to integrate changes with no conflicts.

Does the git worktree workflow check for uncommitted changes before cleaning?

Yes, the git worktree workflow enforces uncommitted changes checks and validates correct directory contexts before executing clean commands to prevent accidental data loss during branch management.

When do I need to use git worktrees for bug fixes?

You need to use git worktrees for bug fixes when starting tasks that benefit from isolated worktrees and clear branching strategies, ensuring the main repository remains unpolluted until the fix is merged.