git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Branch list by date

From
JAJeremy Apthorp <nornagon@nornagon.net>
Date
Jul 8, 2014, 04:54 UTC
Message-ID
<CAMxk9GhQs_kF5573MS1SJ6a7UZuPu+oquXidOOvibznLQ7_FWw@mail.gmail.com>

I built this terribly-written alias because I wanted to see a list of branches by date of commit. The output looks like this:

$ git bbd
  11 months ago  pipette_editor
    7 weeks ago  ensure-ie-rendering-edge
    6 weeks ago  strings-yml
    5 weeks ago  message-when-validation-fails
    4 weeks ago  new-parsers
    11 days ago  tax
    8 hours ago  search
    7 hours ago  browse
 16 minutes ago  master
  8 seconds ago  org-read
And the alias, in all its glory:
[alias]
  bbd = "!export head=$(git symbolic-ref HEAD); git for-each-ref
--sort=committerdate --format 'color=$(if [[ %(refname) = $head ]];
then printf \"\\e[32m\"; fi); printf \"\\e[01;30m%%15s\\e(B\\e[m
%%s%%s\\n\" %(committerdate:relative) $color %(refname:short)'
refs/heads/ --shell | sh"

I write this missive with dual purpose: firstly to share a potentially useful tool, and secondly to suggest that this feature (with a less mind-wrenchingly disgusting implementation) might be included in mainline git, as for example `git branch [-t] | [--by-time]`.

Until the ocean swallows us all, j

Next: Jeff King
Message 1 of 2 in “Branch list by date”
  1. Jeremy ApthorpJul 8, 2014
  2. Jeff KingJul 9, 2014

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.