Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Same using a git alias rather than shell, and without the network bits, it just cleans up branches which have an upstream that has been deleted:

    '!f() { git branch --format '%(refname:short) %(upstream:track,nobracket)'  | awk '$2~/^gone$/{print $1}'  | xargs git branch -D; }; f'


Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: