Skip to content

Instantly share code, notes, and snippets.

@jklmli
Last active August 29, 2015 14:24
Show Gist options
  • Save jklmli/4b50e1c6c2720b42bc5d to your computer and use it in GitHub Desktop.
Save jklmli/4b50e1c6c2720b42bc5d to your computer and use it in GitHub Desktop.
Get most recent branches in git
git for-each-ref --sort='-authordate:relative' --format='%(color:red)%(objectname:short) %(color:white)- %(color:yellow)(%(refname:short)) %(color:white)%(subject) %(color:green)(%(authordate:relative)) %(color:bold blue)<%(authorname)>' refs/heads | more -R`
# Or in `.gitconfig / [alias]`,
rec = !git for-each-ref --sort='-authordate:relative' --format='%(color:red)%(objectname:short) %(color:white)- %(color:yellow)(%(refname:short)) %(color:white)%(subject) %(color:green)(%(authordate:relative)) %(color:bold blue)<%(authorname)>' refs/heads | more -R
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment