git-cleanup docs

A zero-dependency CLI that scans local & remote Git branches, cross-references them with pull-request state, and safely prunes what is genuinely dead. These pages are the reference; the README has the full narrative, and the playground runs the real decision engine in your browser.

Quick start

npm install -g @maliqkara/gitcleanup
cd ~/your/repo && git-cleanup scan     # what's dead?
git-cleanup prune                    # deletes nothing without asking
git-cleanup sweep                    # every configured repo in one pass

Pages

PageWhat it covers
Installnpm, Homebrew, npx, from source; requirements
UsageEvery command: scan, prune, prs, sweep, report-issue, doctor, backup, completions, hooks
ConfigurationThe full schema: thresholds, rules, protected globs, remote/backup/sweep sections, layered config files
Forge supportGitHub, GitLab, Gitea/Codeberg, Bitbucket Cloud & Server: tokens, API bases, self-hosted host claims
AutomationJSON output shapes, exit codes, sweep in cron, CI gates, the GitHub Action
FAQ & troubleshootingSafety model, squash-merge detection, doctor, common errors

Why it exists

git branch --merged only catches branches whose commits are literal ancestors of your base. Squash merges, rebase merges, and cherry-picks rewrite the commits — so those dead branches look unmerged forever and accumulate. git-cleanup additionally fingerprints each branch's final tree against the base's history, which catches them, and is deliberately conservative: protected and checked-out branches are never touched, unmerged work is never deleted without an explicit force rule, and every deletion that loses unique commits writes a recoverable git bundle first.