Using Git Worktrees

Create isolated Git worktrees for feature branches and run tests.

149|10|Updated Oct 30, 2025
One-click install
npx skills add https://github.com/tilework-tech/nori-profiles --skill using-git-worktrees-tilework-tech
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: Using Git Worktrees
Source: https://github.com/tilework-tech/nori-profiles/tree/main/src/installer/features/profiles/config/_mixins/_swe/skills/using-git-worktrees
Command: npx skills add https://github.com/tilework-tech/nori-profiles --skill using-git-worktrees-tilework-tech

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill automates the creation and management of isolated Git worktrees, allowing you to work on multiple features or bug fixes simultaneously without branch switching overhead or polluting your main working directory.

Core Features & Use Cases

  • Isolated Workspaces: Sets up a clean, separate working directory for each task, preventing conflicts.
  • Automated Setup: Automatically detects project type and runs necessary installation commands (e.g., npm install).
  • Safety Checks: Verifies .gitignore and runs baseline tests to ensure a clean, functional worktree.
  • Use Case: When you need to quickly switch between developing a new feature and fixing a critical bug, use this skill to create separate worktrees for each, allowing seamless context switching and parallel development.

Quick Start

Create a new git worktree for a feature branch named 'feature/new-api-endpoint'.

Frequently Asked Questions about Using Git Worktrees

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

FAQPage Schema
How do I work on multiple Git branches simultaneously without switching back and forth?

Git worktrees create isolated workspaces for each branch, letting you develop multiple features in parallel directories without checkout overhead. Each worktree has its own independent environment, dependencies, and test state.

Can I set up a new branch with dependencies installed automatically?

Yes. Git worktrees auto-detect your project type and run installation commands like `npm install` during setup, so your new workspace is ready to develop immediately without manual dependency installation.

What's the best way to prevent branch conflicts when working on multiple features?

Isolated Git worktrees prevent cross-project contamination by giving each branch its own working directory, test environment, and dependency state. This eliminates conflicts from shared node_modules or competing installations.

How do I verify a new worktree is set up correctly before starting development?

Git worktrees automatically run baseline tests after setup to ensure the workspace is functional and clean. Safety checks also verify `.gitignore` configuration before you begin work.

Do I need to manually switch contexts when fixing a bug while developing a feature?

No. With separate worktrees, you keep your feature branch workspace intact and create a new worktree for the bug fix. Both remain open and ready, enabling seamless context switching without losing work state.