using-git-worktrees

Create isolated Git worktrees with directory selection and safety verification.

18|8|Updated May 31, 2023
One-click install
npx skills add https://github.com/jpmorgan-payments/embedded-finance --skill using-git-worktrees-jpmorgan-payments
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: using-git-worktrees
Source: https://github.com/jpmorgan-payments/embedded-finance/tree/main/.github/skills/superpowers/using-git-worktrees
Command: npx skills add https://github.com/jpmorgan-payments/embedded-finance --skill using-git-worktrees-jpmorgan-payments

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill streamlines the process of creating isolated development environments using Git worktrees, ensuring a clean and safe workspace for new feature development.

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 worktree directories are properly ignored by Git to prevent accidental commits.
  • Automated Setup: Detects and runs project-specific setup commands (e.g., npm install, cargo build).
  • Baseline Verification: Runs tests to confirm a clean starting state for the new worktree.
  • Use Case: Before starting work on a new authentication feature, use this Skill to create a dedicated, isolated Git worktree, install dependencies, and run initial tests, ensuring a clean slate.

Quick Start

Use the using-git-worktrees skill to set up an isolated workspace for the 'feature/new-login' 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 feature development?

To create an isolated Git worktree, this skill automates directory selection and safety verification, ensuring the new workspace is properly ignored by Git to prevent accidental commits during 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. This skill creates isolated workspaces allowing simultaneous branch work, preventing local directory conflicts.

How do I automatically run project-specific setup commands like npm install in a new Git worktree?

After creating a Git worktree, this skill detects and automatically runs project-specific setup commands like npm install or cargo build to prepare the isolated development environment.

Does Git worktree creation verify that the new directory is ignored by Git?

Yes, Git worktree creation includes safety verification to ensure new directories are properly ignored by Git. This isolation check prevents the worktree path from being accidentally committed to the repository.

Can I run baseline tests automatically when setting up a Git worktree?

Yes, you can run baseline tests automatically. This skill executes baseline test verification after worktree creation and project setup to confirm a clean starting state for new feature development.

When do I need to use Git worktrees for branch isolation?

You need Git worktrees when starting new features that require a clean slate. This skill provides isolated development environments, managing branch setup and initial verification without disrupting your main workspace.