git удалить все ветви, кроме главных окон

git branch | %{ $_.Trim() } | ?{ $_ -ne 'master' } | %{ git branch -D $_ }
Itchy Impala