What
Delete all local branches except the current branch (master/main).
Why
Local branches accumulate over time. Clean up to reduce clutter and confusion.
How
git branch | grep -v "master" | xargs git branch -D
For main branch:
git branch | grep -v "main" | xargs git branch -D