using-git-worktrees

Add, list, and remove git worktrees for parallel development.

1|Updated Jun 23, 2026
One-click install
npx skills add https://github.com/phuonghx/aim-cli --skill using-git-worktrees-phuonghx
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: using-git-worktrees
Source: https://github.com/phuonghx/aim-cli/tree/main/aim/templates/aim-agents/skills/using-git-worktrees
Command: npx skills add https://github.com/phuonghx/aim-cli --skill using-git-worktrees-phuonghx

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) components.

What problem does it solve?

The Skill addresses the issue of parallel work in a single git working tree causing conflicts, especially useful when working on hotfixes or reviewing branches without disturbing others.

Core Features & Use Cases

  • Isolation of Parallel Work: Allows separate branches to be worked on simultaneously without conflicts.
  • Hotfixes Without Stashing: Enables quick fixes to ongoing features without the need to stash or clone.
  • Side-by-Side Branch Comparison: Facilitates comparison of different branches without interference.

Quick Start

Add a new worktree for 'feature/login' using the command: git worktree add ../proj-feature -b feature/login.

Frequently Asked Questions about using-git-worktrees

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

FAQPage Schema
How do I work on a git hotfix without stashing my current changes?

Git worktrees allow you to isolate parallel work in a separate directory, enabling quick hotfixes to ongoing features without the need to stash changes or clone the repository.

What is the best way to compare git branches side-by-side without interference?

Using git worktrees facilitates side-by-side branch comparison by creating isolated working trees. This allows you to compare different branches simultaneously without disturbing your main working tree.

How do I add a new git worktree for a feature branch?

To add a new git worktree, use the command `git worktree add ../proj-feature -b feature/login`. This creates an isolated directory for parallel development to prevent branch conflicts.

Does git worktree parallel development require any external dependencies?

Git worktree parallel development requires only the git version control system. It supports standard operations like adding, listing, and removing worktrees, as well as handling cleanup.

Why do parallel branches cause conflicts in a single git working tree?

A single git working tree only supports one active branch at a time, causing conflicts when switching contexts. Git worktrees solve this by isolating separate branches in distinct directories for seamless merging.

How do I handle cleanup and removal of git worktrees after parallel development?

Git worktree operations include built-in commands for listing, removing, and handling cleanup of worktrees. This ensures your repository remains organized after completing parallel development tasks.