using-git-worktrees

A short, concise phrase that identifies the creative work or its:location in the overall structure.

Updated Jun 23, 2024
One-click install
npx skills add https://github.com/KyleLeduc/bulk-video-review --skill using-git-worktrees-kyleleduc
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: using-git-worktrees
Source: https://github.com/KyleLeduc/bulk-video-review/tree/main/.github/skills/using-git-worktrees
Command: npx skills add https://github.com/KyleLeduc/bulk-video-review --skill using-git-worktrees-kyleleduc

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill helps you create isolated development environments using Git worktrees, preventing conflicts and ensuring a clean workspace for new features.

Core Features & Use Cases

  • Isolated Workspaces: Work on multiple branches simultaneously without context switching.
  • Smart Directory Selection: Automatically determines the best location for new worktrees based on project conventions and user preferences.
  • Safety Verification: Ensures that new worktree directories are correctly ignored by Git to prevent accidental commits.
  • Automated Setup: Runs project-specific setup commands (npm, cargo, pip, poetry, go) after creating a worktree.
  • Baseline Testing: Verifies that the new worktree starts with a clean slate by running project tests.
  • Use Case: When starting a new, complex feature that might take days or weeks, use this skill to create a dedicated, isolated environment for it, ensuring your main branch remains stable.

Quick Start

Use the using-git-worktrees skill to create a new worktree for the 'feature/user-profile' 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?

Git worktrees isolate feature development by creating separate working directories linked to your repository. This Skill automates worktree creation, intelligently selecting directories like .worktrees/ and verifying .gitignore updates to prevent accidental commits.

Can I run automated project setup when creating a git worktree?

Yes, automated project setup runs specific commands like npm, cargo, pip, poetry, or go after creating a git worktree. This ensures the isolated environment has dependencies installed and is ready for immediate feature development.

What is the best way to manage multiple git branches without context switching?

Using git worktrees is the best way to manage multiple branches without context switching. It creates dedicated, isolated working directories for each branch, allowing simultaneous development and keeping your main branch stable.

Does creating a git worktree update .gitignore automatically?

Yes, creating a git worktree updates .gitignore automatically. The Skill includes safety verification to ensure new worktree directories are correctly ignored by Git before creation, preventing accidental commits of workspace folders.

How do I verify a new git worktree starts with a clean testing baseline?

To verify a clean testing baseline, the Skill runs project tests automatically after setting up the git worktree. This baseline testing confirms the isolated environment starts fully functional and free of existing failures.

Where should I put git worktree directories for a new project?

Git worktree directories should be placed in project-local folders like .worktrees/ or worktrees/ based on project conventions. If no local preference exists, the Skill falls back to global configuration or prompts for a directory.