Gitで各ブランチを最近commitした日時順にソートした一覧を表示する

Gitで各ブランチの一覧を最近commitした日時順にソートしたい。

List remote Git branches and the last commit date for each branch. Sort by most recent commit date. · GitHub

にコマンドが書かれている。

for branch in `git branch -r | grep -v HEAD`;do echo -e `git show --format="%ci %cr" $branch | head -n 1` \\t$branch; done | sort -r 

 を実行すればよい。