ce-worktree

Creates isolated git worktrees that copy environment files and apply branch-aware safety rules.

Updated Sep 25, 2024
One-click install
npx skills add https://github.com/kwam1na/athena --skill ce-worktree-kwam1na
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: ce-worktree
Source: https://github.com/kwam1na/athena/tree/main/.agents/skills/ce-worktree
Command: npx skills add https://github.com/kwam1na/athena --skill ce-worktree-kwam1na

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) components.

What problem does it solve?

Create isolated git worktrees to enable parallel feature work or PR reviews without disturbing the main checkout. It also copies environment files from the main repo (skipping .env.example) and applies branch-aware safety rules for dev-tool trust.

Core Features & Use Cases

  • Copies .env* files from the main repository into the new worktree, backing up existing ones when present.
  • Trusts mise and direnv configurations with branch-aware safety checks to minimize prompts on trusted bases.
  • Ensures the .worktrees directory is ignored by Git and provides a straightforward path to switch between worktrees.

Quick Start

Create a new worktree under .worktrees/<branch> from origin/<from-branch> using the recommended script.

Frequently Asked Questions about ce-worktree

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

FAQPage Schema
How do I isolate feature branch work without disturbing my main git checkout?

To isolate feature branch work, you can provision a git worktree under a dedicated directory. This creates an isolated workspace linked to your branch, keeping your main checkout completely untouched while you experiment or review PRs.

How do I copy environment files when creating a new git worktree?

When creating a new git worktree, the process automatically copies your .env files from the main repository into the new workspace. It backs up any existing environment files it encounters and skips .env.example during the copy.

Can I auto-trust dev tools like mise and direnv in an isolated worktree?

Yes, you can auto-trust dev tools like mise and direnv configurations. The process applies branch-aware safety checks to automatically trust these configurations on specific base branches, minimizing prompts during your workflow.

What is the best way to manage parallel feature development using git worktrees?

The best way to manage parallel feature development is creating branch-specific git worktrees. This allows you to run multiple isolated environments simultaneously for long-running experiments or PR reviews without disrupting your primary repository.

Why should the .worktrees directory be ignored by git?

The .worktrees directory should be ignored by git to prevent your isolated workspaces from being tracked in version control. The setup process ensures this directory is automatically added to your ignore rules to keep your repository clean.

Does setting up an isolated git worktree require any external dependencies?

No external dependencies are required to set up an isolated git worktree. The setup relies entirely on built-in scripts to provision the workspace, copy environment files, and apply branch-aware safety rules without needing additional packages.