using-git-worktrees

Create isolated Git worktrees with safety verification and automated setup.

3|1|Updated Oct 17, 2025
One-click install
npx skills add https://github.com/JavierLianoRioz/Iris --skill using-git-worktrees-javierlianorioz
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: using-git-worktrees
Source: https://github.com/JavierLianoRioz/Iris/tree/main/.agent/skills/using-git-worktrees
Command: npx skills add https://github.com/JavierLianoRioz/Iris --skill using-git-worktrees-javierlianorioz

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) and references (resource) components.

What problem does it solve?

This Skill creates isolated Git worktrees, allowing you to work on multiple branches simultaneously without the need to switch contexts, preventing conflicts and maintaining a clean workspace.

Core Features & Use Cases

  • Isolated Workspaces: Develop features in separate directories that share the same repository.
  • Smart Directory Selection: Automatically finds or prompts for the best location to create worktrees.
  • Safety Verification: Ensures project-local directories are ignored by Git before creation to prevent accidental commits.
  • Automated Setup: Detects and runs project-specific setup commands (npm, cargo, pip, poetry, go).
  • Baseline Testing: Runs tests after setup to ensure a clean starting point.
  • Use Case: When starting a new feature like "user authentication," this skill will set up a dedicated worktree, install dependencies, run tests, and confirm readiness, all while keeping your main branch untouched.

Quick Start

Use the using-git-worktrees skill to set up an isolated workspace for the 'feature/new-api' branch.

Frequently Asked Questions about using-git-worktrees

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

FAQPage Schema
How do I use Git worktrees to isolate feature development and keep my main branch untouched?

Git worktrees create isolated workspaces in separate directories sharing the same repository, allowing you to develop features simultaneously without switching branches or risking conflicts on your main branch.

How do I set up a new Git worktree for a Node.js or Rust project?

Creating a Git worktree for Node.js or Rust projects automates directory selection and runs project-specific setup commands like npm or cargo, followed by baseline testing to ensure a clean starting point.

Does Git worktree automated setup support Python and Go project dependency installation?

Yes, Git worktree automated setup detects and executes project-specific dependency installation commands for Python and Go, utilizing pip, poetry, or go commands to prepare the isolated workspace.

How does Git worktree safety verification prevent accidental commits of local directories?

Git worktree safety verification ensures project-local directories are ignored by Git before worktree creation, preventing accidental commits of local files and maintaining a clean repository state.

Why use Git worktrees instead of Git branching for managing multiple features simultaneously?

Git worktrees provide isolated directories for each branch, allowing you to work on multiple features simultaneously without context switching, preventing directory conflicts and maintaining a clean workspace.

What is the best way to manage multiple Git branches without switching contexts in the same directory?

Using Git worktrees is the best way to manage multiple branches, creating isolated workspaces in separate directories that share the same repository to prevent conflicts and eliminate context switching.