Windows Powershell

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

Linux terminal

git branch | grep -v "develop" | xargs git branch -D