How to clean up branches in Git
To delete branches already merged:    git branch --merged | grep -v '^[ *]*main$' | xargs git branch...
Tags: git, terminal