seachicken/gh-poi
seachicken/gh-poi has 1,031 GitHub stars and 41 forks. GitHot measured 0 stars in 24 hours and +7 in 7 days. Last checked 2026-11-13 06:58 UTC. Last push 2026-10-30.
✨ Safely clean up your local branches
Measured star growth
- in 24h
- 0
- in 7 days
- +7
- in 15 days
- Collecting history
- in 1 month
- Collecting history
Net star changes over overlapping periods, not daily totals. Missing measurements are left blank. Stars measure attention, not software quality.
README.md
Originalgh poi
A GitHub CLI extension to safely clean up local branches you no longer need.
Motivation
Daily development makes it difficult to know which branch is active when there are many unnecessary branches left locally, which causes a small amount of stress. If you squash merge a pull request, there is no history of the merge to the default branch, so you have to force delete the branch to clean it up, and you have to be careful not to accidentally delete the active branch.
We have made it possible to automatically determine which branches have been merged and clean up the local environment without worry.
Installation
gh extension install seachicken/gh-poi
Usage
gh poiDelete the merged local branchesgh poi --state (closed|merged)Specify the PR state to delete (defaultmerged)gh poi --scan (quick|deep)Specify the scan mode (defaultquick)quick: Fast; checks "origin" and "upstream" remotes. Identifies PRs using only the latest commit on each branchdeep: Comprehensive; scans all registered remotes. Performs a deeper history check to link branches to PRs, ensuring no potential matches are missed across multiple forks- Note: poi ensures safe deletion in both modes
gh poi --dry-runShow branches to delete without actually deleting itgh poi --debugEnable debug logsgh poi lock <branchname>...Lock branches to prevent them from being deletedgh poi unlock <branchname>...Unlock branches to allow them to be deleted

FAQ
How does gh poi compare with other branch cleanup tools?
gh poi is built for GitHub pull-request workflows. Its GitHub integration considers each PR's state and the commits associated with a local branch, allowing it to clean up squash-merged PRs safely.
| Scenario | gh poi |
git branch --delete-merged |
|---|---|---|
| Merged into the upstream branch, with an associated GitHub PR | ✅ | ✅ |
| Merged into the upstream branch, without an associated GitHub PR | ❌ | ✅ |
| Squash-merged with an associated GitHub PR | ✅ | ❌ |
| Squash-merged locally, without an associated GitHub PR | ❌ | ❌ |
| PR closed without merging | ✅--state closed |
❌ |
| Merged branch in a clean, inactive linked worktree | ✅ | ❌ |
| Keep a merged branch | ✅gh poi lock <name> |
✅branch.<name>.deleteMerged=false |
Why the name "poi"?
"poi" means "feel free to throw it away" in Japanese.
If you prefer an alias, you can change it with gh alias set. (e.g. gh alias set clean-branches poi)
Explore related projects
codecrafters-io/build-your-own-x
Master programming by recreating your favorite technologies from scratch.
562,200 starspublic-apis/public-apis
A collective list of free APIs
498,592 starsmorluto/rea
Reverse engineer anything with agents, from app behavior down to native binaries.
455,951 starsopenclaw/openclaw
The AI that really does things. Any OS. Any Platform. The lobster way. 🦞
394,419 stars