Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save karol-pawlowski/7769ca602f585e589abdbfb848054a0e to your computer and use it in GitHub Desktop.
Save karol-pawlowski/7769ca602f585e589abdbfb848054a0e to your computer and use it in GitHub Desktop.
Write-Host "Removing remote branches from origin that were merged to develop"
git branch -r --merged | Where { $_ -NotMatch "(^\*|master|develop|help|remote)" } | %{ git push origin --delete $_.Trim().replace('origin/', '')}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment