Skip to content

Instantly share code, notes, and snippets.

@stash
Created March 25, 2014 21:32
Show Gist options
  • Save stash/9771848 to your computer and use it in GitHub Desktop.
Save stash/9771848 to your computer and use it in GitHub Desktop.
most-recently-used git branches (Perl one-liner)
git reflog | perl -ne 'print $1,$/ if (/checkout: moving from .+? to (.+)$/ && !$seen{$1}++)'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment