Description
Is 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.
Activity
shiftkey commentedon Jul 17, 2018
I'm actually more interested in this part of the issue than changing the sorting, because I've spent a bit of time in there thinking about how it works.
I think the core of your problem is that we don't consider whether a branch exists in the list when we're reading the reflog. I can see this in my local Desktop clone after pruning some merge branches:
Are you pruning your merged branches? I think the fact that our
getRecentBranchesfunction here doesn't confirm a branch exists locally mean we can end up often showing fewer branches than the 5 allowed.desktop/app/src/lib/git/reflog.ts
Lines 5 to 8 in 56b1fe7
hubgit commentedon Jul 25, 2018
The remote branches are being deleted when they're merged, but the local branches aren't being pruned. Does the list take account of which branches are in the origin repository and which have been merged, or is it literally just the most recently-edited local branches?
If I run the
git branchesalias that's in the issue description, I can see 5 local branches edited in the last 24hr, but GitHub Desktop only shows 4 of them (+ master).There could easily be more than 5 branches edited in the last 24hr, as well.
I'm interested to know when it's useful to have branches listed in alphabetical order, rather than by date.
shiftkey commentedon Jul 25, 2018
@hubgit thanks for the extra details
No, the code has zero context on the actual branch details and just walks the reflog to find the N most recent branches that were checked out locally. This is what we consider "recent" - branches that you've checked out locally, and we don't look at the most recent commit to each branch.
This makes sense - we mark
masteras the default branch, so it gets listed before these recent branches and we show one fewer.This is mostly just mirroring the defaults of
git branchshiftkey commentedon Jul 25, 2018
@billygriffin would love your thoughts on two related questions here:
the recent branches list - using the reflog or looking at the most recent commit timestamp? We've gone with the former option because that felt more focused on you, but if you're in a more collaborative situation using the commit timestamp means you might able to keep up with activity from collaborators
sorting the branch list - alphabetical versus date? Do we follow Git here and list alphabetically in a predictable way, or would seeing up-to-date branches be helpful for finding things in some situations?
billygriffin commentedon Jul 27, 2018
@shiftkey @hubgit Thanks for clarifying this, and sorry for the delay in responding. The potential for misaligned expectations vs what's actually presented makes total sense. I added this to our research list (and the label is helpful in reinforcing that). I don't see it as insanely high priority, but definitely worth examination in the next few months as we dig into usability more generally.
I think there are two things here:
We should choose whatever patterns are most useful to people, which I think we've attempted to do but may need to re-evaluate with observing people using the app.
Whatever we do arrive at, we should make sure the words we use to communicate them match people's expectations. So in this case, we say "Recent branches", but if "recent" means different things to different people, we need to choose clearer language.
Also want to make sure @ampinsk and @donokuda have visibility on this.
oguzyildizz commentedon Jun 28, 2019
It would be also great if I could increase the number of recent branches displayed in there. Once a branch I'm trying to get is 6th most recent one, finding it takes a bit time
outofambit commentedon Jul 1, 2019
Thanks for the bump here @oguzyildiz1991 ! There's another conversation happening in #7755 that I've linked this issue to.
jcushman commentedon Nov 23, 2020
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/ | lessto 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.oguzyildizz commentedon Nov 23, 2020
Exactly. If you're working on 5 branches it's alright, but once you're looking for the 6th most recent branch, suddenly you gotta go on an adventure
steveward commentedon Oct 18, 2021
In #13105 it was brought up that remote branches do not appear in the
Recent brancheslist. Showing them would align with what was mentioned in #5155 (comment):7 remaining items
tidy-dev commentedon Oct 21, 2025
From #21132
msawired commentedon Nov 4, 2025
on another ticket, I also suggested the exact solution. Adding an option to change ordering alphabetical vs. date in Other Brances would solve lots of problems mentioned here: Would help finding "other" recent branches not displayed in "recent branches", and it would also help notice and clean stalled branches.
metasidd commentedon Apr 13, 2026
Love that solution @msawired . I believe this would be helpful even after a user types in a search query. Given that projects can have thousands of branches (open and closed), I'd love to see it sorted by last updated.
greegus commentedon Apr 29, 2026
This feature is so needed – once you work with more than a few branches that you checkout between often, it's practically impossible with this app to get to one without knowing an exact name.
The sorting of the unfiltered (no search query) list of branched just doesn't make ANY sense to me. WHY would anybody want to see a 2-year-old branch in front of a 3-month-old one, followed by a 9-month-old one, when trying to check out last week's work?! It's not even alphabetically sorted. Literally counterproductive.
Add script runner, text size fixes and six community-requested features
adesai1000 commentedon Sep 21, 2026
For anyone still waiting on this since 2018: my fork, GlitchHub Desktop, adds it. Settings > Appearance > Branch List has "Sort other branches by" with a "Last update, newest first" option. The Default and Recent groups keep working the way they do today; the long tail of other branches is what gets sorted by the tip commit date. You can also right-click any branch to pin it to the top of the list.
Not affiliated with GitHub. macOS on Apple silicon only for now, unsigned build, so right-click and Open the first time. Separate profile folder, so it lives happily next to GitHub Desktop.
Download: https://github.com/adesai1000/GlitchHub-Desktop/releases/latest
If it is useful, a star on the repo would help other people here find it.
Sort other branches by tip commit date
Sort other branches by tip commit date
Sort other branches by tip commit date