using-git-worktrees

Create isolated Git worktrees with safety verification and automatic project setup.

Updated Nov 16, 2022
One-click install
npx skills add https://github.com/kos3nz/dotfiles --skill using-git-worktrees-kos3nz
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: using-git-worktrees
Source: https://github.com/kos3nz/dotfiles/tree/main/.config/agents/skills/using-git-worktrees
Command: npx skills add https://github.com/kos3nz/dotfiles --skill using-git-worktrees-kos3nz

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Create isolated Git worktrees to isolate feature work from the current project workspace.

Core Features & Use Cases

  • Isolate feature development by creating per-feature worktrees that share the same repo.
  • Enforce safety verifications to ensure worktrees are ignored by git and do not pollute history.
  • Automatically detect project setup and run language/tool-specific installation steps after creating a worktree.

Quick Start

Ask me to create an isolated git worktree for the current project and switch to it.

Frequently Asked Questions about using-git-worktrees

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

FAQPage Schema
What is a git worktree and when should I use it for feature work?

A git worktree creates an isolated directory linked to your repository, allowing you to develop features separately. Use it to isolate feature work from your current project workspace without cloning the entire repository again.

How do I create an isolated git worktree for my current project?

To create an isolated git worktree, the tool selects a target directory by priority, verifies the worktree is ignored by git to prevent history pollution, and automatically runs language-specific setup commands for the new workspace.

Does git worktree support automatic project setup and dependency installation?

Yes, git worktree creation includes automatic project setup. After creating the worktree, the tool detects your project environment and runs language-specific installation steps to prepare the isolated workspace immediately.

Why does my git worktree show up in the repository status?

Git worktree visibility in repository status happens when worktrees are not properly ignored. The tool enforces safety verification to ensure worktrees are ignored by git, preventing them from polluting your project history.

What's the best way to manage local and global worktree directories?

The best way to manage worktree directories is by selecting locations based on priority. The tool handles both local and global worktree directories, ensuring proper isolation and safety verification for each feature workspace.

Do I need to manually ignore git worktrees to prevent history pollution?

No, you do not need to manually ignore git worktrees. The tool applies safety verification to ensure worktrees are automatically ignored by git, protecting your repository history from unintended pollution.