Using lots of #git topic branches?
Define an alias named "delete-merged-branches", containing this:
!git branch --merged | grep -Ev '(main|master)' | xargs -prn1 git branch -d
Since this is a bit tricky to do right with "git config" with the bang and the quotes, I'd recommend you just edit the [alias] section in your .git/config or ~/.gitconfig file. 🙂