Skip to content

Instantly share code, notes, and snippets.

@Likk
Created February 5, 2013 02:50
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Likk/9af89b10fd0008df91ad to your computer and use it in GitHub Desktop.
Save Likk/9af89b10fd0008df91ad to your computer and use it in GitHub Desktop.
git branch の最終更新日でソートするワンライナー
git branch -v | perl -MDateTime::Format::HTTP -nle 'my @c= split/(?:\*?\s)+/,$_; my $e= `git show $c[2] --date=rfc2822 --pretty="%cd" --decorate | head -n 1`;chomp $e ; print sprintf("%s %s",DateTime::Format::HTTP->parse_datetime($e),join q{ },@c) ;' | sort
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment