Three Ways to Clean Up Local Git Branches
Local Git branches accumulate after pull requests merge, remotes disappear, or experiments end. This post compares pruning branches whose upstream is gone, removing branches merged into an integration branch, and starting fresh.
Each command has a different safety boundary. The examples use Git’s branch state rather than names alone, and explain when a destructive cleanup is appropriate instead of treating deletion as routine.