Skip to content

Instantly share code, notes, and snippets.

@greggerz
Created August 26, 2019 17:18
Show Gist options
  • Save greggerz/37cbb4336cb879e41b003309647dfc57 to your computer and use it in GitHub Desktop.
Save greggerz/37cbb4336cb879e41b003309647dfc57 to your computer and use it in GitHub Desktop.
#!/usr/bin/env bash
git checkout develop || git checkout master
git pull
git branch --merged | grep -Ev "(^\*|develop|master)" | xargs -r -n 1 git branch -d
git remote prune origin
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment