0.0.1 • Published 7 months ago
fmb v0.0.1
fmb - Fire (remove) Merged Branches
fmb
is a simple CLI tool for removing Git branches that have already been merged into origin/main
.
Features
- Deletes merged branches automatically.
- Supports excluding specific branches.
- Supports branch filtering with glob patterns.
- Interactive confirmation before deletion.
- Automatic deletion without confirmation using the
--all
flag.
Usage
npx fmb [excluded-branches|glob-pattern] [--all]
Examples
Delete all merged branches except
main
andmaster
:npx fmb
Exclude custom branches:
npx fmb develop,canary
Use Glob Patterns:
npx fmb 'feature/*'
Automatic Deletion Without Confirmation:
npx fmb --all
Interactive Confirmation:
- You will be prompted to confirm each branch deletion unless
--all
is specified.
- You will be prompted to confirm each branch deletion unless
How It Works
- Fetches updates from the remote repository and prunes deleted branches.
- Lists all branches that are merged into
origin/main
. - Excludes specified branches or matches them using glob patterns.
- Deletes branches automatically or prompts for confirmation based on the
--all
flag.
License
MIT License © 2024 Naver Financial