Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- gbDi() {
- git branch --sort=-committerdate | remove-colors | egrep -v "master|\*" | cut -c3- > /tmp/branches && \
- cp /tmp/branches /tmp/branches-to-keep && \
- vim /tmp/branches-to-keep && \
- comm -23 <(sort /tmp/branches) <(sort /tmp/branches-to-keep) | xargs 2> /dev/null git branch -D
- }
- remove-colors() {
- sed -r "s/\x1B\[([0-9]{1,2}(;[0-9]{1,2})?)?[m|K]//g"
- }
Add Comment
Please, Sign In to add comment