Skip to content

Add ability to soloing selected branches #1687

Open

Description

@Mingun

GitKraken has a useful feature in some scenarios: hide all other branches from the commit graph except the selected. This is named soloing. Unlike simply hiding branches, canceling solo is done with the one click. Thus, you can quickly temporarily turn off other branches, and after completion of the work, turn on everything that was previously visible back (and not turn on what was not visible).

In addition, you may append branches to the existing "solo" list.

Activity

  1. Doodeletion commented on Aug 7, 2025

    @Doodeletion
    Contributor

    What specifically is the difference from SourceGit's Filter in commit graph?

    after completion of the work, turn on everything that was previously visible back (and not turn on what was not visible)

    Is turning back on only branches that were previously visible the main point?

  2. heartacker commented on Aug 7, 2025

    @heartacker
    Contributor

    I want a mode that only displays the commits associated with the current head/branch,
    and is different from the highlight branch and filter modes.

    1. In highlight mode, it only highlights the current node and its parent.
      a. Its children are not highlighted.
      b. All other branches, commits, and decorated nodes interfere.
    2. Branch filtering is cumbersome.
      a. It requires careful selection of the branch, but I simply want to select the current branch without thinking.
      b. It only displays the parent, not the children. I would like to be able to view the parts associated with its children.
  3. heartacker commented on Aug 7, 2025

    @heartacker
    Contributor

    step 1:

    # git branch --contains <commithash>,
    # e.g.
    git branch --contains HEAD
    
    # convert to filter
    git branch --contains HEAD | sed 's/^[ *\+]*//' | tr '\n' ' '

    step 2:

    show those branches in a graph format:

    git log `git branch --contains HEAD | sed 's/^[ *\+]*//' | tr '\n' ' '` --oneline --graph --decorate
  4. heartacker commented on Aug 7, 2025

    @heartacker
    Contributor

    FocusCommit Mockup

    PixPin_2025-08-07_15-04-37.mp4
  5. heartacker commented on Aug 7, 2025

    @heartacker
    Contributor
    PixPin_2025-08-07_20-11-02.mp4
  6. heartacker commented on Aug 8, 2025

    @heartacker
    Contributor

    Introducing the whole new solo mode Now:

    Based the commit(s), the Solo mode will show the commit and its contians decorators(branchs/tags/etc.), make you focus on your work , Eliminate other interferences

    solo Head just on click

    a. This will add HEAD and current_HEAD_sha to filter, current_HEAD_sha IT will be usefull if HEAD is changed in future

    solo commit

    You can select commit and add this commit to solo-commit filter

    solo Commits

    You can select multi commits and add those commits to solo-commit filter. That is great to focus/compare branch/tag/etc

    navigate

    Fantastically, you can navigate the branch/tag/commit filter in graph view now.

    PixPin_2025-08-08_10-26-57.mp4
  7. Mingun commented on Aug 8, 2025

    @Mingun
    ContributorAuthor

    Tip: it is hard to understand whats happening on the video. I think, the better would be to show 2 screenshots: one baseline and one with the solo enabled for the commit / branch / whatever (and describe, for what thing it was enabled). For example, I expect, if you solo the origin/develop branch (the HEAD commit of this branch) from the video preview pic, then only commits, corresponds to this branch is shown, so if you select commit in the graph, you may navigate to commits in this branch by just up/down arrows.

  8. heartacker commented on Aug 8, 2025

    @heartacker
    Contributor

    What is Solo Mode?

    Solo Mode designed to streamline the view of commit histories by focusing on specific commits and their direct associations.

    When enabled, users can select one or more commits as filters. The tool then displays only the elements directly linked to these chosen commits, including:

    • Local branches that contain the commits
    • Related remote branches (such as those not yet merged into the local repository)
    • Tags attached to the commits

    By hiding unrelated branches, tags, or commits, Solo Mode reduces visual clutter, allowing users to concentrate on analyzing the connections, origins, or merge status of the specific commits they care about.

    For example, if you filter by the commit pointed to by HEAD, Solo Mode will show only your current branch, its associated remote branches, and any tags on that commit—making it easier to focus on relevant details without distractions.

  9. heartacker commented on Aug 8, 2025

    @heartacker
    Contributor
    Image
  10. heartacker commented on Aug 8, 2025

    @heartacker
    Contributor

    navigate just a function that could navigate the filters
    including the branch-filter and tags-filter and also the commit_hash(solo) filter

  11. heartacker commented on Aug 8, 2025

    @heartacker
    Contributor

    is it clear

  12. Mingun commented on Aug 8, 2025

    @Mingun
    ContributorAuthor

    With screenshots, the explanations are much clearer 👍

    I correctly understand, that if I solo branch name, then this will persist even when branch is updated? In other words, the solo will be associated with a branch ref and not with the commit of the branch HEAD when solo was enabled?

  13. Mingun commented on Aug 8, 2025

    @Mingun
    ContributorAuthor

    Also, will this mode be saved across sessions (i. e. after close / open the application)?

  14. heartacker commented on Aug 8, 2025

    @heartacker
    Contributor

    First

    1. Solo mode is base Commit, if the commit_filter is kept on, and the branch/commits/tag/remote related to this commit is always shown.
      a. BTW the HEAD FILTER, it will always show the current HEAD in Sole mode, if you are change the HEAD like changing the branch and so on
      b. If you use sgit to checkout the new branch, sgit will clear the filter and add the new branch-filter, the commit-filter will be removed(This is the mechanism of sgit and I have no control over it)
    2. The filter is saved across sessions (this is the sgit feature, the filter feature)
  15. heartacker commented on Aug 8, 2025

    @heartacker
    Contributor
    1. branch-filter only should its local and remote(default, you can remove this)
    2. commit-filter always shows related commit/branch/tags/etc(all including ahead and behind )
  16. heartacker commented on Aug 8, 2025

    @heartacker
    Contributor

    I find that:

    if we have HEAD filter, it's no necessary to clear and add new-branch filter anymore

    HEAD FILTER will follow the branch-head

  17. heartacker commented on Aug 9, 2025

    @heartacker
    Contributor

    这种模式对多分支并行的项目实在是太有用了 🔥
    This mode is really useful for projects with multiple parallel branches.

    PixPin_2025-08-09_11-32-05.mp4
  18. heartacker commented on Aug 9, 2025

    @heartacker
    Contributor

    在版本对比中,使用Solo 模式,并配合提交已选记忆,非常方便 👯
    In version comparison, using Solo mode Cooperating with PR:selected-commits-memories is very convenient.

    PixPin_2025-08-09_11-57-00.mp4
  19. heartacker commented on Aug 26, 2025

    @heartacker
    Contributor

    I'm trying out a method to highlight the route. How do you all think

    PixPin_2025-08-26_16-28-41.mp4
  20. Mingun commented on Aug 26, 2025

    @Mingun
    ContributorAuthor

    From the video it is not obvious, what condition is used for making line bold. When you at commit H or master, only line H--origin/master is bold, but when you at Fix large TextBox not wrapping, the origin/outlines -- ..., H--origin/master and a small loop with Fix large TextBox not wrapping is bold.

    It seems, basically, all lines that starts in the graph after (upper) the selected commit are bold + some "main" line. But how the "main" line is determined?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions