using-git-worktrees

Create isolated git worktrees for feature development with safety verification.

3|Updated Apr 18, 2026
One-click install
npx skills add https://github.com/nassimbf/ftitos-claude-code --skill using-git-worktrees-nassimbf
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: using-git-worktrees
Source: https://github.com/nassimbf/ftitos-claude-code/tree/main/skills/using-git-worktrees
Command: npx skills add https://github.com/nassimbf/ftitos-claude-code --skill using-git-worktrees-nassimbf

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Isolates feature work by creating dedicated git worktrees so you can develop in parallel without disrupting the main workspace.

Core Features & Use Cases

  • Automated worktree discovery and directory selection (local .worktrees, worktrees, or global location) with preference rules.
  • Safety verification to ensure worktrees are ignored by git to prevent accidental commits of worktree contents.
  • Auto-detection of project setup steps (e.g., npm, cargo, python) and seamless switch to the new worktree for feature development.

Quick Start

Ask me to set up an isolated git worktree for your current project and I will perform the controlled, safe workspace creation.

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 isolated git worktrees for parallel feature development?

To create isolated git worktrees, you automate directory selection across local or global locations, verify the path is gitignored to prevent accidental commits, and initialize project-specific dependencies for immediate feature work.

What is the best way to prevent cross-branch contamination when switching git branches?

Preventing cross-branch contamination involves using isolated git worktrees to separate feature development environments. This approach maintains a clean baseline in your main workspace by dedicating a separate directory to each branch.

Does git worktree creation automatically handle project setup for npm, cargo, or python?

Yes, git worktree creation includes auto-detection of project setup steps for environments like npm, cargo, and python. It seamlessly switches to the new worktree and prepares the specific project dependencies for immediate development.

How does git ensure worktree contents are ignored to prevent accidental commits?

Ensuring worktree contents are ignored requires a safety verification step before creation. The system automatically checks that the chosen worktree directory, whether local or global, is properly configured in gitignore to prevent accidental commits.

When do I need to use a global location for git worktrees instead of a local directory?

You need a global location for git worktrees when local directory options like .worktrees are unavailable or unsuitable. The automated discovery process applies preference rules to determine the best safe location for your isolated workspace.