Skip to main content

Git Worktree Doctor

@mgreten/git-worktree-doctorv2026.05.19.1· 1d agoMODELS
01README

Diagnose and prune git worktrees. Parses git worktree list --porcelain, validates paths exist on disk, detects stale/locked/prunable entries, and optionally prunes them. Works with any git repository — no project-specific assumptions.

02Release Notes

Initial release: diagnose and prune git worktrees with structured health reports.

03Models1
@mgreten/git-worktree-doctorv2026.05.19.1git_worktree_doctor.ts
fn diagnose(repoPath?: string)
Parse `git worktree list --porcelain`, validate paths, and report health of all worktrees
ArgumentTypeDescription
repoPath?stringOverride the global repoPath for this invocation
fn prune(dryRun: boolean, repoPath?: string, verbose: boolean)
Run `git worktree prune` to remove stale worktree entries. Use dryRun=true to preview without removing.
ArgumentTypeDescription
dryRunbooleanPreview what would be pruned without actually removing (default: true)
repoPath?stringOverride the global repoPath for this invocation
verbosebooleanPass --verbose to git worktree prune

Resources

diagnosis(7d)— Structured health report of all git worktrees in a repository
pruneResult(30d)— Result of a git worktree prune operation
04Stats
A
100 / 100
Downloads
0
Archive size
7.4 KB
  • Has README or module doc2/2earned
  • README has a code example1/1earned
  • README is substantive1/1earned
  • Most symbols documented1/1earned
  • No slow types1/1earned
  • Has description1/1earned
  • Platform support declared (or universal)2/2earned
  • License declared1/1earned
  • Verified public repository2/2earned
05Platforms