Delete all local git branches
function Delete-LocalBranches ($Commit = 'HEAD', [switch]$Force) { git branch | ? { $_ -notmatch '(^\*)|(^. master$)' } | % { git branch $(if($Force) { '-D' } else { "-d" }) $_.Substring(2) } }