Incantation: Most recent git branches
List git branches, sorted by last commit date.
alias lsbranch='git for-each-ref --sort="-committerdate" --format="%(refname)%09%(committerdate)" refs/heads | sed -e "s-refs/heads/--" | tac'
I know, I know. You practice good discipline and only have a few branches. I spent most of a decade at Google using CitC where I’d have a new branch (called client) per PR (called Changelist/CL). Old habits die hard.
My git branch workflow tends to be a forest of stumps instead of a deep trees of branches. Given that, I use this tool daily to pop back to what I was doing most recently.