DEV Community

Discussion on: Introducing purgitory. My first npm package :)

Collapse
 
fanchgadjo profile image
Francois K

Cool name indeed. To solve this problem, I have been using this command from the oh-my-zsh git plugin :

❯ grep 'merge' ~/.oh-my-zsh/plugins/git/git.plugin.zsh
alias gbda='git branch --no-color --merged | command grep -vE "^(+|*|\s*($(git_main_branch)|development|develop|devel|dev)\s*$)" | command xargs -n 1 git branch -d'

Collapse
 
sduduzog profile image
Sdu

Exactly! that's the thing. This command looks really scary. and for something you'll only do once in a couple of weeks, there's no chance you could remember this, unless you save it somewhere