Sort all branches by last update
See original GitHub issueIs your feature request related to a problem? Please describe.
Showing recent branches is a great feature, but I often have trouble finding a fairly recent branch because it’s disappeared from the short “Recent Branches” list.
Describe the solution you’d like
Divide the list of branches into “Local Branches” (sorted by date) and “Remote Branches” (sorted by date), instead of “Recent Branches” (sorted by date) and “Other Branches” (sorted alphabetically).
It’s not very useful to have branches sorted alphabetically, as you can already type to filter them.
Describe alternatives you’ve considered
Switching to the command line and using a custom git branches
alias:
for-each-ref --sort=committerdate refs/heads/ --format='%(HEAD) %(color:yellow)%(refname:short)%(color:reset) - %(color:red)%(objectname:short)%(color:reset) - %(contents:subject) - %(authorname) (%(color:green)%(committerdate:relative)%(color:reset))'
Teachability, Documentation, Adoption, Migration Strategy
This would replace the current dropdown list of branches.
Issue Analytics
- State:
- Created 5 years ago
- Reactions:6
- Comments:13 (8 by maintainers)
Top GitHub Comments
The way I perceive recent, is “locally recent” - which branches I have actually recently used/switched to, on this machine). I think this functionality is fine, and I don’t need more than 3 of these for my own usage.
However, it is very annoying that I cannot see new branches that have been added remotely (we have a lot of branches). For this issue, I would suggest a selection of sorting (Name or Date), ideally this option is global, and saved automatically with app settings.
I’ll just add another user story for this feature. I often use “recent branches” to switch between the last few branches when I’m working on a couple of things at once. But if I start working on something and then move away for a little longer, I’ll have to do something like
git for-each-ref --sort=-committerdate refs/heads/ | less
to find it again because the list only has five items. “Other branches” has hundreds of branches and doesn’t serve any use for me when ordered alphabetically.