Imagine you’ve been hopping between tasks for a few months, creating a new branch for every ticket. Many were merged, some were abandoned, and others were just experiments. Now your local repository is overflowing with dozens of branches you no longer need.
This guide helps you clean up, by creating a script which:
- identifies local branches that don’t exist on any remote or whose upstream has been deleted,
- shows you what it plans to delete,