Often I find I retain my local GIT branches long after their usefulness expires. Deleting them one at a time is a hassle, and probably the reason I don’t clean them up more often.
Fortunately, someone found a better way. A one line command (ok, its actually 3 commands piped together), and *poof*, all my local branches (EXCEPT master) are deleted.
Use this with caution, as you will lose all work in those branches that haven’t been merged to master yet.
git branch | grep -v "master" | xargs git branch -D
You can confirm the branches are gone by listing all your local branches:
$ git branch
* master