Skip to content
GitTree
Commit graph

Focus and filter the graph

In a busy repository, Focus on Current Branch shows just your branch, its upstream and its base, with how many commits it has since the base. Filter Graph… keeps the commits of an author, a date range or a path. Filtering never deletes history; Clear Graph Filter brings every row back.

FreeUpdated

Works in GitTree Free: every local Git feature, once you are signed in.

On this page
  1. Before you start
  2. Where to find it
  3. Steps
  4. Expected result
  5. The base branch
  6. If something goes wrong
  7. Questions
  8. Related

Before you start

  • A repository is open.

Where to find it

  • The command palette: Focus on Current Branch, Filter Graph… and Clear Graph Filter.
  • Right-click a branch label: Show Only This Branch or Focus on This Branch; on a tag, Show Only This in Graph.
ActionmacOSWindows and Linux
Focus on Current Branch⌘⇧BCtrl+Shift+B
Jump to HEAD⌘⇧HCtrl+Shift+H

Steps

  1. Focus on your branch

    Press the shortcut or run Focus on Current Branch. The graph keeps your branch, its upstream and its base branch, and says how many commits your branch has since the base.

  2. Or filter by author, date or path

    Run Filter Graph…. Fill in Author name or email contains, From and To, or Touches path (such as src/ or README.md), and choose where to Start from.

  3. Read the filter bar

    A bar above the graph says Filtered: and what is filtered. Only matching commits are shown.

  4. Clear it

    Choose Clear Graph Filter in the bar or the palette. Every row comes back.

Expected result

The graph shows just the part of the history you are working on.

The base branch

Focus compares your branch with its base: the repository’s base, origin’s default branch, or main. Choose Choose Base… to pick another; Compare against base branch in Filter Graph sets it too.

If something goes wrong

“No commits match this filter.”

Loosen it: check the author’s spelling or widen the dates.

“… share no history”

The branch and its base have no commit in common, so there is nothing to count. Choose another base.

Questions

Does the filter change the search?

Search finds commits among the rows the graph shows; clear the filter to search the whole history.