# Git Worktree Workflow Error Handling

> Sub-skill of git-worktree-workflow: Error Handling.

- Skill: `vamseeachanta/git-worktree-workflow-error-handling` (Agent Skill)
- Install (CLI): `npx skillmds@latest add vamseeachanta/git-worktree-workflow-error-handling`
- Raw SKILL.md: https://api.skillmd.com/api/skills/vamseeachanta/git-worktree-workflow-error-handling/raw
- Safety review: PASS (external: skill-scanner PASS, skillspector PASS)
- Works with: Claude Code, Claude.ai, OpenAI Codex
- Category: Productivity
- Author: vamseeachanta (https://skillmd.com/u/vamseeachanta)
- Updated: 2026-09-17
- Page: https://skillmd.com/skills/vamseeachanta/git-worktree-workflow-error-handling

---


# Error Handling

## Error Handling


| Error | Cause | Solution |
|-------|-------|----------|
| Branch already checked out | Branch exists in another worktree | Remove existing worktree or use different branch |
| Cannot remove worktree | Uncommitted changes present | Commit, stash, or force remove |
| Permission errors | Directory not writable | `chmod -R u+w <worktree>` then remove |
| Stale worktree references | Worktree directory deleted manually | Run `git worktree prune` |
| Lock file exists | Previous operation interrupted | Remove `.git/worktrees/<name>/locked` file |
| Path already exists | Directory exists at target path | Choose different path or remove existing directory |

