Skip to content

Instantly share code, notes, and snippets.

@vojd
Created November 25, 2012 19:09
Show Gist options
  • Save vojd/4144830 to your computer and use it in GitHub Desktop.
Save vojd/4144830 to your computer and use it in GitHub Desktop.
Git - list remote branches by revision date
for k in `git branch -r | perl -pe 's/^..(.*?)( ->.*)?$/\1/'`; do echo -e `git show --pretty=format:"%Cgreen%ci %Cblue%cr%Creset" $k -- | head -n 1`\\t$k; done | sort -r
# http://stackoverflow.com/questions/2514172/listing-each-branch-and-its-last-revisions-date-in-git
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment