Skip to content

Instantly share code, notes, and snippets.

@carltondickson
Last active August 29, 2015 14:24
Show Gist options
  • Save carltondickson/b5421a81b0dc0b253c5d to your computer and use it in GitHub Desktop.
Save carltondickson/b5421a81b0dc0b253c5d to your computer and use it in GitHub Desktop.
Sort git branches by date
# Remote branches
for k in `git branch -r|awk '{print $1}'`;do echo `git show --pretty=format:"%Cgreen%ci %Cblue%cr %Cred%cn %Creset" $k|head -n 1`\\t$k;done|sort -r
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment