troubleshoot-worktree

Diagnose and resolve Git worktree, branch, and refname conflicts.

3|1|Updated Jan 1, 2026
One-click install
npx skills add https://github.com/JacobPEvans/claude-code-plugins --skill troubleshoot-worktree
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: troubleshoot-worktree
Source: https://github.com/JacobPEvans/claude-code-plugins/tree/main/git-workflows/skills/troubleshoot-worktree
Command: npx skills add https://github.com/JacobPEvans/claude-code-plugins --skill troubleshoot-worktree

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) and references (resource) components.

What problem does it solve?

This Skill helps diagnose and resolve common and critical issues related to Git worktrees, branches, and reference names, ensuring a clean and functional Git environment.

Core Features & Use Cases

  • Diagnose Ambiguous Refnames: Identifies and provides commands to fix the "refname is ambiguous" warning.
  • Worktree Management: Offers solutions for adding, finding, and removing Git worktrees.
  • Branch Recovery: Guides users through fetching, resetting, and recovering branches.
  • Use Case: When Git reports an ambiguous refname like origin/main, this Skill provides the exact commands to diagnose and fix the conflict, preventing further Git errors.

Quick Start

Run git worktree list, git branch -a, and git status to diagnose your Git worktree and branch issues.

Frequently Asked Questions about troubleshoot-worktree

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

FAQPage Schema
How do I fix the "refname is ambiguous" error in Git?

To fix a Git ambiguous refname error, you need to diagnose conflicting branch and tag names using commands like `git branch -a`. This Skill provides exact diagnostic commands to identify and resolve these reference conflicts, preventing further Git operational errors.

How do I recover a missing Git worktree with uncommitted changes?

Recovering a missing Git worktree with uncommitted changes requires running `git worktree list` to locate missing directories. This Skill guides you through branch recovery procedures and diagnostic commands to safely retrieve and restore your repository's operational stability.

What is the best way to remove a Git worktree without losing branch data?

The best way to remove a Git worktree safely involves using specific Git worktree management commands to prune or delete directories. This Skill offers solutions for adding, finding, and removing worktrees while ensuring underlying branch data and overall repository integrity remain intact.

Why does Git report an ambiguous refname like origin/main?

Git reports an ambiguous refname like origin/main when both a branch and a tag share the same reference name. This Skill helps diagnose these reference conflicts by providing targeted commands to identify the duplicate references and cleanly resolve the naming ambiguity.

Can I use standard Git commands to diagnose worktree and branch conflicts?

Yes, you can use standard Git commands like `git worktree list`, `git branch -a`, and `git status` to diagnose worktree and branch conflicts. This Skill leverages these baseline commands to provide structured recovery procedures for complex repository issues.