Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/bin/bash
- # Usage: git branch-clean
- #
- # Removes all branches which have been successfully merged safely.
- # Uses -d instead of -D to ensure only merged branches will be
- # deleted.
- #
- # Install this script on your PATH somewhere.
- set -ex
- git branch --merged | egrep -v "(^\*|master|dev|production)" | \
- xargs -r git branch -d
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement