git-worktree-workflow

Coordinate git worktree setup, syncing, PR preparation, and cleanup for forked repositories.

3|Updated Mar 1, 2010
One-click install
npx skills add https://github.com/harleypig/dotfiles --skill git-worktree-workflow-harleypig
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: git-worktree-workflow
Source: https://github.com/harleypig/dotfiles/tree/main/config/claude/skills/git-worktree-workflow
Command: npx skills add https://github.com/harleypig/dotfiles --skill git-worktree-workflow-harleypig

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Coordinate git worktree workflows for forked or personal repositories, enabling setup, syncing, PR preparation, and cleanup.

Core Features & Use Cases

  • Manage base clones and related worktrees for forked and related repos
  • Create, switch, and prune worktrees for issues, PR prep, and cross-branch merges
  • Enforce safe workflows with preconditions, confirmations, and consistent merge/rebase strategies

Quick Start

Start by telling the assistant to "work on issue N" to create and manage a worktree for that issue.

Frequently Asked Questions about git-worktree-workflow

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

FAQPage Schema
How do I manage git worktrees for forked repositories across multiple branches?

Managing git worktrees across forks involves coordinating base clones and related worktrees to handle syncing, PR preparation, and cleanup. This workflow enforces safe preconditions and consistent merge or rebase strategies to reconcile related sibling clones.

What's the best way to set up a git worktree workflow for working on specific issues?

Setting up a git worktree workflow for issues means creating isolated working directories linked to your main repository. You can start by instructing your assistant to work on a specific issue number to automatically create and manage the corresponding worktree.

Can I use git worktrees to prepare pull requests and merge across branches safely?

Git worktrees can prepare pull requests and facilitate cross-branch merges by providing separate directories for each task. The workflow enforces explicit user confirmations and safe preconditions before applying any merge or rebase strategies.

Does coordinating git worktrees across teams require manual branch syncing?

Coordinating git worktrees across teams automates branch syncing by deriving default branches and resolving worktree paths. It manages base clones and related repos to ensure consistent state without manual reconciliation for every update.

How do I clean up and prune git worktrees after merging a pull request?

Cleaning up git worktrees after merging involves pruning obsolete directories and syncing the base clone. The workflow manages this cleanup phase by enforcing safe preconditions and explicit confirmations before removing any worktree.

When should I not use a git worktree workflow for version control?

You should avoid using a git worktree workflow if your version control process cannot accommodate explicit user confirmations or strict preconditions. Complex reconciliations across sibling clones require consistent merge strategies that may not suit rapid, unattended automated pipelines.