I have a lot of local branches. Running git branch
lists them and they overflow the page. I often want to toggle between the currently checked out branch and the branch I was working on last, or possibly one before the last. The process is to scan the list of 20-30 local branches by eye or possibly command+f if I'm lucky enough to remember a keyword (or ticket number).
Instead I'd like to say git branch
and have it display branches by checkout order. The same way you seem many items listed in many programs ordered by most recent activity. This seems like an obvious default choice for order criterion and I'm surprised it isn't git's default.
edit:
i revised my question to ask only about a sort by checkout. i'm unable to find a sorting predicate that will filter the output of git branch
by the date of each branches most recent checkout.