using-git-worktrees

Create isolated git worktrees with safety checks and priority-based directory selection.

3|1|Updated Jun 3, 2025
One-click install
npx skills add https://github.com/Tobbe3108/GoPayShortcuts --skill using-git-worktrees-tobbe3108
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: using-git-worktrees
Source: https://github.com/Tobbe3108/GoPayShortcuts/tree/main/.opencode/skills/using-git-worktrees
Command: npx skills add https://github.com/Tobbe3108/GoPayShortcuts --skill using-git-worktrees-tobbe3108

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This skill helps developers isolate feature work by creating and managing dedicated git worktrees, preventing contamination of the main workspace and enabling parallel experimentation.

Core Features & Use Cases

  • Directory priority and selection: Always pick existing local worktrees (.worktrees or worktrees) first.
  • Safety verification: Ensure new worktrees are ignored by git to avoid committing worktree contents.
  • Flexible location options: Support project-local and global storage locations, with automatic project name inference.
  • Use Case: When starting a new feature, create an isolated worktree for the feature branch to keep the main repo clean.

Quick Start

Use this skill to set up an isolated worktree for your current project.

Frequently Asked Questions about using-git-worktrees

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

FAQPage Schema
How do I create a git worktree for feature development without affecting my main workspace?

Creating a git worktree for feature development isolates your changes by setting up a separate working directory. This skill selects an appropriate local or global location, applies safety checks, and verifies a clean baseline before handing off the new worktree.

What is the best way to manage multiple git branches for parallel experimentation?

Managing multiple git branches for parallel experimentation is best done using isolated git worktrees. This approach assigns each feature branch its own directory, preventing workspace pollution and allowing you to safely develop features concurrently.

How does git check-ignore verify worktree safety before creating a new branch?

Git check-ignore verifies worktree safety by ensuring the new worktree directory is properly ignored by your repository configuration. This prevents the contents of your isolated worktree from being accidentally committed to the main project.

Can I use a global directory location for project worktrees instead of local folders?

You can use a global directory location for project worktrees instead of local folders. This skill supports flexible storage options, automatically inferring the project name and applying priority-based directory selection to find the right fit.

Do I need a clean git baseline before setting up an isolated worktree?

You need a clean git baseline before setting up an isolated worktree to ensure your main branch has no uncommitted changes. This skill validates your working directory state and reads CLAUDE.md preferences before creating the new worktree.