Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
How to delete merged git remote branches (git-flow safe)
git fetch --prune |
git branch -r --merged |
grep origin |
grep -v '>' |
grep -v master |
grep -v develop |
sed -E "s|^ *origin/||g" |
xargs git push origin --delete
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.