I use an alias in my ~/.gitconfig to quickly see the last 10 branches I've worked on (especially helpful when jumping back and forth between branches).
Update: I somehow missed the
--count argument to the
for-each-ref command (thanks @hauleth), so instead of this being a shell function, it's a simple alias.
[alias] recent-branches='for-each-ref --sort=-committerdate --count=10 --format='%(refname:short)' refs/heads/'