#!/usr/bin/env bash
#
# List git remote branches by owner
#git for-each-ref --format='%(committerdate) %09 %(authorname) %09 %(refname)' | sort -k5n -k2M -k3n -k4n

# git fetch --all --prune
# git for-each-ref --format='%(committerdate:relative) %09 %(authorname) %09 %(refname)' --sort='committerdate' | grep 'Tom Alexander'

git ls-remote --heads origin | awk '{print $1}' | while read hash; do
    PAGER='' git log -n1 --pretty=format:'%Cgreen%<(20)%cr%Creset %C(bold blue)%<(20)%an%Creset %C(yellow)%d%Creset %n' "$hash"
done
