Sublime Forum

Sublime Merge: Better management of hidden branches

#1

Not sure if this is already possible, but leave it marked as ideas and feature requests.

I use a lot the feature of hiding branches, to leave the repo in a clean way to look at and keep only important or pending stuff visible.

Once everything is hidden, it’s easy to keep going, as soon as you fetch and see a branch that you are not interested in, it’s easy to mark it as hidden. Or when you finish working with a branch, you can hide it.

However, if for some reason you re-clone the repo again somewhere else, or if by mistake you click on “show all hidden branches”, then everything is reset. And if you have to go over 100 branches to hide 95, I cannot even do it with the keyboard (maybe it’s possible? If I hit TAB it never reaches the left panel with all the branches).

Suggestions:

  • have a button that toggles all branches hidden, but allows to individually show them and keeps the default as shown (at the moment the button that does that hides them by default, so any future branch is not shown by default, and has to be manually toggled)
  • persist this list of hidden branches somehow in a file that can be committed or kept track somehow, if I switch repo, I would like to be able to copy this file and have the same config as in the previous repo (right now I don’t know where this data is even stored)

Also open to hear if there are other flows that might fix this.

0 Likes

#2

Hi @mbl,

Thanks for sharing this feedback! We’ll definitely take this on board.

It’s also worth noting that you can use ctrl + 8 (cmd + 8 on MacOS) to toggle visibility of all branches except the checked out branch. This may help in your case.

You can also alt + left click the visibility icon of a branch in the sidebar to hide everything except that branch.

Many thanks,
- Dylan from Sublime HQ

2 Likes

#3

Thanks Dylan!

The problem with both of those toggles is that it also toggles the “no branch visible by default”, which means even if there are newer branches in origin, when fetching, they won’t appear.

For example: in my case when I clone a repo, for example I like to hide every past branch except trunk, and maybe some other relevant branches (either a topic we are working on or some special branches). But after having done that once then I can maintain the shown/hidden branches incrementally by myself. I like that when I fetch I see which branches other colleagues are working on, I can hide them one by one. And the same with finished work, I can hide it to get it out of my mind (while knowing the branch is still there and can re-show them in case I need to look back quickly for something)

The no-brainer that would help a lot in my case is to allow to select multiple branches at once and hide them, without toggling the global “only show selected branches”.

Maybe you figure out a better ux.

But I suggested something orthogonal that I think would go a long way, which is to persist the state in a file (don’t know where it’s persisted right now) like, e.g., sublime.json, which we could have next to the code in the repo (.gitignored —or not), and that people could programmatically modify/fill/update, to support any flow.

Related to this last proposal, it’s a similar issue for branches that have a merge commit and that I also “collapse” by clicking on the blue button:

38

The list of branches that are collapsed would go a long way if it was kept in an explicit file that holds the state, because it’s also meta-data that gets lost when switching or re-cloning in a new computer.

Thanks!

0 Likes