intellij drop branch code example Example: delete all local branches webstorm git branch --merged | egrep -v "(^\*|master|dev)" | xargs git branch -d