Advertisement
Guest User

Untitled

a guest
Oct 1st, 2016
60
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.32 KB | None | 0 0
  1. #!/bin/bash
  2. # Usage: git branch-clean
  3. #
  4. # Removes all branches which have been successfully merged safely.
  5. # Uses -d instead of -D to ensure only merged branches will be
  6. # deleted.
  7. #
  8. # Install this script on your PATH somewhere.
  9.  
  10. set -ex
  11.  
  12. git branch --merged | egrep -v "(^\*|master|dev|production)" | \
  13. xargs -r git branch -d
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement