Clean remote branches
git remote prune origin
Clean branches already merged into master
git checkout master
for k in $(git branch -a --merged|grep -v "\->"|sed s/^..//);do echo -e $(git branch -d "$k");done
Print local branches sorted by last commited by
for k in $(git branch -a |grep -v "origin"|sed s/^..//);do echo -e $(git log -1 --pretty=format:"%Cgreen%ci %Cred%cr%Creset" "$k")\\t"$k";done|sort