git-worktree-workflow

Manage Git worktrees for isolated, scripted software development workflows.

Updated Dec 23, 2025
One-click install
npx skills add https://github.com/vineethsoma/agent-packages --skill git-worktree-workflow-vineethsoma
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: git-worktree-workflow
Source: https://github.com/vineethsoma/agent-packages/tree/main/skills/git-worktree-workflow
Command: npx skills add https://github.com/vineethsoma/agent-packages --skill git-worktree-workflow-vineethsoma

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) components.

What problem does it solve?

This skill helps developers manage multiple concurrent user stories without context switching by leveraging git worktrees to isolate work in separate directories.

Core Features & Use Cases

  • One-worktree-per-story to ensure clean isolation
  • Deterministic syncing with main via merge or rebase
  • Automated lifecycle: create, sync, merge, and remove worktrees and branches

Quick Start

From repository root, perform:

  • Check status: ./scripts/worktree-status.sh
  • Create a new worktree: ./scripts/worktree-create.sh us1
  • Sync a story: ./scripts/worktree-sync.sh us1
  • Merge and cleanup: ./scripts/worktree-merge.sh us1

Frequently Asked Questions about git-worktree-workflow

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

FAQPage Schema
How do I use git worktrees for parallel feature development?

Git worktrees enable parallel feature development by isolating separate story branches into distinct working directories, allowing you to manage multiple user stories simultaneously without context switching. This skill automates that worktree creation and lifecycle.

How do I sync a git worktree with the main branch?

You can sync a git worktree with the main branch by running a dedicated sync script that updates the base branch via either a merge or rebase operation. This deterministic syncing ensures your isolated story branch stays current with the shared repository.

What is the best way to manage multiple git branches at the same time?

The best way to manage multiple concurrent user stories is using a one-worktree-per-story approach. It provides clean isolation for each branch and automates the lifecycle from creation and syncing to conflict detection, merge readiness validation, and final cleanup.

How do I detect merge conflicts in a git worktree before merging?

You can detect conflicts in a git worktree by running a validation script that checks readiness to merge. This automated process identifies conflicts during the syncing phase, ensuring issues are resolved in the isolated worktree before integrating into the shared repository.

How do I clean up git worktrees and branches after merging?

You can clean up git worktrees and branches after merging by running a dedicated merge and cleanup script. This removes the completed worktree directory and deletes the associated story branch, maintaining a clutter-free repository environment.