create-worktree

Create a new git worktree with copied .env files and branch initialization.

1|Updated Jul 19, 2019
One-click install
npx skills add https://github.com/isaac-scarrott/dev-files --skill create-worktree-isaac-scarrott
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: create-worktree
Source: https://github.com/isaac-scarrott/dev-files/tree/main/.claude/skills/create-worktree
Command: npx skills add https://github.com/isaac-scarrott/dev-files --skill create-worktree-isaac-scarrott

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) components.

What problem does it solve?

This Skill addresses the challenge of managing multiple code branches within a single repository. It simplifies the process of creating new worktrees, making it easier to start a new ticket or branch without cluttering the main repository.

Core Features & Use Cases

  • Branch Creation: Automatically creates a new git worktree based on the current branch.
  • Ticket Integration: Supports ticket IDs and descriptive branch names for clear worktree naming.
  • .env File Handling: Copies gitignored .env files into the new worktree, ensuring the environment is set up correctly.
  • Use Case: When working on a new feature or bug fix, use this Skill to create a dedicated worktree, keeping your main branch clean and organized.

Quick Start

Create a new worktree for a feature branch 'feature/new-feature'.

Frequently Asked Questions about create-worktree

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

FAQPage Schema
How do I create a git worktree and copy my .env files automatically?

To create a git worktree with .env files, you can use an automation script that initializes a new branch from your current repository and copies gitignored environment variables into the new worktree directory.

What is the best way to manage multiple git branches without cluttering the main repository?

Using git worktrees allows you to manage multiple branches by creating separate working directories linked to the same repository, keeping your main branch clean and organized while supporting ticket-based development.

Can I integrate ticket IDs into my git worktree branch names?

Yes, you can integrate ticket IDs into git worktree branch names by passing the ticket ID and a descriptive name to your worktree creation script, which initializes the new branch with a clear naming convention.

Do I need to manually copy gitignored .env files when setting up a new git worktree?

You do not need to manually copy gitignored .env files when setting up a new git worktree if you use an automation script that handles the environment variable file duplication automatically during branch initialization.

How does a git worktree script handle environment setup for new feature branches?

A git worktree script handles environment setup by automatically creating a new working directory from the current branch and copying necessary gitignored .env files to ensure the new feature branch has the correct environment variables.