Pular para o conteúdo
Kitbay
Skill

cleanup-git-worktrees

NOASSERTIONAtualizado em 11 de nov. de 202684.974Estrelas no GitHubInclui scripts

A maintainer skill in the LobeHub repository for auditing and removing stale Git worktrees and local branches.

O que a skill ensina

A maintainer skill in the LobeHub repository for auditing and removing stale Git worktrees and local branches. A bundled shell script fetches and prunes the remote, looks up each branch's pull request state with the GitHub CLI and classifies every worktree as deletable, needing manual review or protected, ignoring noise and scratch files. The agent shows one grouped table and deletes only after a single explicit approval, passing exact branch names; the script re-checks each target and refuses ones that are not candidates or are in use. It explains how to prove squash or rebase merges, never removes main, canary or the current worktree, and audits again afterwards.

O que faz

  • Classify Git worktrees as deletable or protected
  • Check pull request state for each branch
  • Remove approved worktrees and branches
  • Prove squash-merged branches landed