using-git-worktrees

Create isolated Git worktrees on new branches with gitignore verification.

Updated Aug 27, 2026
One-click install
npx skills add https://github.com/vorynkavitaliy/openclaw-assistent --skill using-git-worktrees-vorynkavitaliy
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: using-git-worktrees
Source: https://github.com/vorynkavitaliy/openclaw-assistent/tree/main/.agents/skills/using-git-worktrees
Command: npx skills add https://github.com/vorynkavitaliy/openclaw-assistent --skill using-git-worktrees-vorynkavitaliy

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Git worktrees provide isolated workspaces that share the same repository, enabling concurrent feature work without disturbing the main workspace. This skill streamlines the setup, enforces safety checks, and reduces the risk of accidentally committing to the wrong branch.

Core Features & Use Cases

  • Priority-based directory selection: prefer local project directories, then global locations, with automatic project-name detection.
  • Safety verification: ensures worktrees are ignored by gitignore before creation to prevent accidental commits.
  • End-to-end workflow: creates the worktree on a new branch, switches context, and guides subsequent setup steps.

Quick Start

Use this skill to set up an isolated workspace for a new feature 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 create an isolated Git worktree for a new feature branch?

To create an isolated Git worktree, this skill automates workspace setup by auto-detecting the project name, selecting a priority-based directory, and creating the worktree on a new branch. It prevents workspace contamination by enforcing clean baselines for concurrent feature work.

What is the best way to manage multiple Git branches without contaminating the main workspace?

Git worktrees provide isolated workspaces sharing the same repository, enabling concurrent feature work without disturbing the main workspace. This skill streamlines worktree setup, enforces safety checks, and reduces the risk of accidentally committing to the wrong branch.

Does Git worktree creation verify gitignore settings before setting up the workspace?

Yes, this skill performs safety verification to ensure worktrees are ignored by gitignore before creation. This prevents accidental commits of project-local worktree directories and maintains a clean repository state across your dev workflow.

How do I switch development context across multiple branches in a local project?

Switching development context is handled by creating a Git worktree on a new branch and automatically switching context to the isolated workspace. The skill then guides you through optional subsequent setup steps to complete the transition.

What are the limitations of using Git worktrees for branch management?

Git worktrees require careful directory management to avoid workspace contamination, and this skill mitigates that by preferring local project directories then global locations. You must ensure your gitignore properly excludes worktree paths to prevent accidental repository commits.