list git remote branches order by modified date

create a bash file and put in the content below:

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

Advertisements