Graph
Search and filters
17 min read
In a repository with years of history and dozens of branches, finding what matters is half the work. Versora offers two families of tools:
- Search and highlight: the search (Ctrl+F) marks the matching commits and takes you from one to the next; the author filter dims other people's commits. Neither removes commits from the graph.
- Choose what goes into the graph: hide branches with the eye, solo a few, hide whole sections or use a preset. This changes which commits the graph reads.
The Filter field in the left panel (Ctrl+Alt+F) is a third case: it shortens the panel lists, without touching the graph.
The search looks for commits in the whole repository, not only in the loaded ones, and marks the results in the graph and on the overview bar. You choose what to search in the Search by picker.
- Shortcut: Ctrl+F, with the focus on the graph.
- The Search button in the MESSAGE column title (tooltip "Search commits by message, author, SHA, file, change or date (Ctrl+F)"). With a search active, the button shows the type and the text, for example "Message: login".
- Palette (Ctrl+P): "Search the graph…".
- Press Ctrl+F. The search bar opens below the header, with the cursor in the field.
- Choose the type in Search by (see the table below).
- Type the text. Message, Author and SHA search as you type; File, Change and Operators wait for Enter; the dates search when you pick the day.
- Move through the results: Enter goes to the next one, Shift+Enter to the previous one (or use the bar's arrows). The status shows the position, for example "3 of 27".
- Esc or the X closes the search, clears the text and removes the marks from the graph. The focus goes back to the graph.
| Search by | Example text in the field | What it finds | When it searches |
|---|---|---|---|
| Message | "Text in the title or description" | Commits with the text in the title or description, case-insensitive. "Searches the whole repository as you type." | As you type |
| Author | "Name or email" | "Commits by whoever has this name or email." | As you type |
| SHA | "Start of the hash, branch or tag" | "Goes to the commit with this hash (or where the branch/tag points)." An ambiguous hash prefix (4 characters or more) lists all the commits that start like that. | As you type |
| File | "Path or part of it (accepts *.css, src/**/*.ts)" | "Commits that changed the file or folder. Press Enter to search." Without a wildcard, any path containing the text matches; *.md matches in any folder. | Enter |
| Change | "Text that was added or removed" | "Commits that added or removed this text in files. Press Enter to search." | Enter |
| After | Date picker | "Commits made on or after this day (author date)." Goes straight to the oldest commit of the period. | When you pick the date |
| Before | Date picker | "Commits made before this day (author date)." | When you pick the date |
| Operators | "login -wip author:ana file:src/*.ts after:2024-03" | Combines text, author, file, change, dates and exclusion. See "Search with operators" below. | Enter |
When you switch between text types, the typed text stays; between text and date, the field is cleared.
The search only reads the history. Each type becomes a git log over the same refs as the graph
(hidden branches are left out; in solo, only the soloed branches):
# Message
git log --date-order --format=%H -n5001 -i --fixed-strings --grep=login --branches --tags --remotes HEAD
# Author
git log ... -i --fixed-strings --author=ana ...
# Change (pickaxe)
git log ... -i -SparseToken ...
# File
git log ... --full-history ... -- ":(icase,glob)**/*checkout*"
For After and Before, the app reads each commit's author date and cuts at the chosen day
(git's --since would look at the commit date, which changes in a rebase or cherry-pick).
- "searching…": the search is running. A new search ends the previous one. Change in a large repository can take a few seconds.
- "no commits found": no commit matches, within the branches the graph shows. A commit that only exists on a hidden branch doesn't appear: show the branch and search again.
- The maximum is 5,000 results. Above that, the total gets a "+" and the tooltip says "There are more results than the limit shown".
- A result beyond the loaded commits is reached too: the app loads what's missing.
- The search is redone on its own when the repository changes (new commit, rebase, branch filter).
- Each tab has its own search; it isn't saved when you close the app.
- "The search failed.": git refused the search; git's message appears in place of the status.
The Ctrl+F key can be changed in Keyboard shortcuts.
- Navigating the graph
- File history and Line history, to follow a file or a range of lines.
In Operators mode, a single field combines several criteria, like a search engine: words in
the message, author, path, changed text, dates, merges and exclusions with "-". For example, Ana's
commits with "login" in the message, without "wip", that touched .ts files in src in the last
two weeks:
login -wip author:ana file:src/*.ts after:2w
Ctrl+F › Search by › Operators. The ? button next to the field opens "Search operators", with all the operators; clicking an example adds it to the search ("Add to the search").
- Open the search and choose Operators.
- Type the terms separated by spaces. Use quotes for a phrase with spaces:
"fix login". - Press Enter to search and, again, to go to the next result.
- If in doubt, click ? and click the examples to build the search.
"Terms add up (all of them must hold)."
| Operator | Example | What it does |
|---|---|---|
loose words (or message:, msg:) | login bug | All the words in the message (title or description). |
-word | -wip | Without this word in the message. |
"phrase" | "fix login" | The exact phrase, with spaces. |
author: (or @:) | author:ana | Author by name or email. |
-author: | -author:bot | Without this author. |
file: (or path:, ?:) | file:src/*.ts | Touched this path (accepts * and **). |
-file: | -file:docs | Didn't touch this path. |
change: (or ~:) | change:parseToken | Added or removed this text in files. |
commit: (or sha:, #:) | commit:main | This commit (SHA, branch or tag). |
after: (or since:) | after:2024-03 | From a year, month or day on. |
before: (or until:) | before:2024-07-01 | Before a year, month or day. |
date: | date:2024-01..2024-06 | Within a period (date:2024-03 covers the whole month). |
| relative dates | after:2w | Relative to today: d (days), w (weeks), m (months), y (years). |
is:merge / -is:merge | -is:merge | Only merges / no merges. |
"Several author: or file: mean "any of them". Dates are the commit author's, in this computer's
time zone." The ! sign also excludes (!wip). A word followed by a colon that isn't an operator
(such as fix:) stays as message text.
What git filters well (text, author, path, change, merges) goes to git log; what it can't combine
(excluding words, excluding an author or path, the author date) the app filters on the output. The
dates are converted by git itself, in the computer's time zone.
- "Unrecognized date: "…". Use 2024, 2024-03, 2024-03-15 or a relative period such as 7d, 2w, 6m, 1y."
- "The change: operator doesn't support exclusion ("-")." The same applies to
commit:,after:,before:anddate:. - "Use a single change: per search (git looks for one change at a time)."
- "Unrecognized value in is: "…". Use is:merge or -is:merge."
- An operator without a value yet (
author:) or a lone "-" don't filter anything: you can type at your own pace.
- The "Search commits" section, above.
The author filter highlights the commits of one or more people and dims everyone else's, without removing anything from the graph. It's for seeing at a glance what someone did in a period, or what came in from each person on a branch. You can also dim merges.
The funnel button in the AUTHOR column title (tooltip "Filter by author"; with authors chosen, "Highlighting 2 authors — click to change" and the number on the button).
- Click the AUTHOR column's funnel. The Highlight commits by window opens with the repository's authors, from the one with the most commits to the one with the fewest.
- Type in Find author to shorten the list (name or email).
- Check one or more people. The other authors' commits are dimmed.
- Check Dim merges to dim the merge commits too.
- To turn it off, click clear (in the window or in the "highlighting 2 authors" footer).
| Option | What it does | Default |
|---|---|---|
| Each author's checkbox | Highlights the person's commits (one person = one email). | None |
| Dim merges | Dims the merge commits. | Off |
| clear | Turns both off. | — |
Only to build the list: git log --format=%an%x1f%ae over the graph's refs, counting each email's
commits. Nothing changes in the repository.
- The filter applies to the tab and isn't saved when you close the app.
- The WIP row and the WIP rows of other worktrees are never dimmed.
- "Loading authors…" and "No authors found." appear in the list while it loads or when the search finds no one.
- The Author search and the
author:operator, above, to go from commit to commit.
The Filter field, at the top of the left panel, shortens the panel lists: local branches, remotes, worktrees, stashes, tags and the other sections show only what contains the text. Folders expand on their own while you filter. The graph doesn't change.
- The Filter field, at the top of the left panel.
- Shortcut: Ctrl+Alt+F, from anywhere in the window (it moves the cursor to the field and selects the text).
- Press Ctrl+Alt+F.
- Type part of the name, for example
login: the branches, tags and stashes whose name (or message, in the case of stashes) containsloginremain, case-insensitive. - To filter only one remote's branches, use
remote:pattern(table below). - Esc in the field clears the filter.
| Text | What it shows |
|---|---|
login | Everything whose name contains "login". |
origin:main | The branches of the origin remote whose name contains "main". |
origin:release/* | The branches of origin whose whole name matches release/* (with * or ?, the pattern applies to the whole name). |
*:main | The branches with "main" in the name, on any remote (the remote also accepts a wildcard). |
upstream: | All the branches of the upstream remote. |
If what comes before the colon isn't one of the repository's remotes, the text works as a regular filter.
- The panel filter doesn't hide anything in the graph. For that, use the eye (next section).
- The TAGS section lists up to 300 tags. With more, the end of the list says "+120 more tags — use the filter to find them".
The Ctrl+Alt+F key can be changed in Keyboard shortcuts.
Each branch in the left panel has an eye. Hiding a branch removes its label from the graph and the commits that only it reaches. This clears the graph of branches that don't matter right now, such as other teams' branches or automatic dependency branches, without deleting anything.
- The eye on each row of the LOCAL and REMOTE sections of the left panel ("Hide in graph" / "Show in graph").
- Branch menu (in the panel or on the graph label) › Hide in graph / Show in graph.
- In the left panel, hover over the
renovate/eslint-9branch and click the eye. - The branch name is dimmed and struck through in the panel (the crossed-out eye stays always visible), the label leaves the graph and the footer now says "1 branch hidden".
- To show it again, click the eye once more or show all in the footer.
The graph starts reading the log with the branch excluded:
git log --date-order -n3000 --exclude=renovate/eslint-9 --branches --tags --remotes HEAD
Nothing changes in the repository: the branch still exists, locally and on the remote.
Click the eye again, use show all in the footer or the palette's "Show all branches in the graph". Hiding isn't part of Ctrl+Z.
- The filter (hidden and solo) is saved per repository and stays when you reopen the app.
- The current branch can also be hidden with its eye. Hiding a whole section never hides it.
- A label that combines local and remote only leaves the graph if both are hidden.
- The "Showing N" at the top of the panel counts how many branches, tags and stashes the graph is showing (tooltip "Branches, tags and stashes shown in the graph").
- The search and the author filter also respect hidden branches.
- To hide without having to think about it again (and remove it from the panel too), see Archiving branches.
Solo does the opposite of the eye: instead of removing branches, it picks the only ones the graph
shows. With feature/login in solo, the graph shows only that branch's history. You can solo
several branches at the same time.
Branch menu (local or remote, in the panel or on the graph label) › Solo — show only this branch. With the branch already in solo, the item becomes Stop solo.
- Right-click
feature/login› Solo — show only this branch. - To compare it with
main, do the same onmain: both are in solo. - The footer shows "Solo: feature/login, main" and the show all link.
- To take one out of solo, its menu › Stop solo; to take all of them out, show all.
git log --date-order -n3000 refs/heads/feature/login refs/heads/main
In solo, hidden branches are ignored and the graph shows only the commits reached by the soloed branches.
Stop solo in the branch menu, show all in the footer or the palette's "Show all branches in the graph".
- The current branch only appears if it's in solo too. The ready-made presets (below) include the current branch automatically.
- Stashes don't appear in solo.
- Each branch's eye still shows whether it's marked as hidden: that's what disappears again when the solo ends.
- The "Visibility presets" section, below, which builds the solo for you.
Instead of clicking the eye of each branch, you can hide at once all local branches, all remotes (or just one), all tags or all stashes. It's useful, for example, in a repository with hundreds of remote branches, to see only your local work.
- The eye on the header of the LOCAL, REMOTE, TAGS and STASHES sections and of each remote folder.
- Right-click the section header (or the remote folder):
| Where | Items |
|---|---|
| LOCAL header | Hide all local branches / Show all local branches |
| REMOTE header | Hide all remotes / Show all remotes |
A remote's folder (origin) | Hide all branches of origin / Show all branches of origin |
| TAGS header | Hide all tags / Show all tags |
| STASHES header | Hide all stashes / Show all stashes |
With the section partially hidden, both items appear.
- Right-click the REMOTE header › Hide all remotes.
- The remote branches leave the graph; the footer shows how many were hidden.
- To see only one remote, right-click the
originfolder › Show all branches of origin. - To see only one branch of a hidden section, click its eye: it appears on its own.
Each hidden section becomes an --exclude before the group, a single option however large the
section is:
# LOCAL hidden (the current branch stays, through HEAD)
git log --date-order -n3000 --exclude=* --branches --tags --remotes HEAD
# Only the origin branches hidden
git log --date-order -n3000 --branches --tags --exclude=origin/* --remotes HEAD
With STASHES hidden, the stashes don't go into the log.
The Show all… item of the same section, the eye on the header or show all in the footer.
- The current branch never disappears when you hide the LOCAL section: the graph keeps showing where you are.
- The eye of a branch inside a hidden section shows only that branch (an exception within the section).
- Show all… also removes the exceptions and the branches hidden one by one in that section.
- Hidden tags and stashes appear with the name dimmed and struck through in the panel (they don't have an eye of their own).
Presets apply at once a set of soloed branches designed for a common situation: working on your branch, reviewing only your work or following your favorites. You can also save the current filter under a name and come back to it later.
- The Presets button (funnel icon), to the left of "Showing N", at the top of the left panel. With a preset in use, the button shows its name.
- Palette (Ctrl+P): "Graph: Smart Branches preset", "Graph: Only my work preset", "Graph: Favorites preset", "Graph: show all branches" and "Graph: save current filter as preset…".
| Preset | What the graph shows |
|---|---|
| All branches | Turns off the preset and the solo. With branches hidden by hand, it appears as "All branches (except hidden ones)": the hidden ones stay hidden. |
| Smart Branches | "current, upstream and target": the current branch, its upstream and the branch it's headed for (the parent in the stack, Gitflow's develop or main by prefix, or the main branch), with the target's upstream. In detached HEAD, the main branch. It follows the checkout. |
| Only my work | "your branches, the current one and the main one": the current one and its upstream, the main branch (local and remote) and the branches with commits of yours that aren't in the main branch yet or that you created in this clone, with their upstreams. |
| Favorites | The starred branches that still exist, plus the current one. It's disabled without favorites ("no branches marked"). |
| Saved presets | The saved filter (hidden and solo), exactly as it was. |
| Save current filter as preset… | Saves the current filter under a name, for this repository only. Disabled without a filter. |
| Delete preset | Submenu with the saved presets. |
"Commits of yours" means commits with your email configured in git (without an email, the name counts). "Created in this clone" means the branch was created here, and not from a remote branch (according to the first line of its reflog).
Use a ready-made preset
- Click Presets › Smart Branches.
- The graph now shows only the current branch, the upstream and the target. The footer says "Preset: Smart Branches · 3 branches".
- Check out another branch: the preset recalculates on its own.
- To turn it off, click turn off in the footer or Presets › All branches.
Save your own preset
- Hide branches and/or solo branches until the graph looks the way you want.
- Presets › Save current filter as preset….
- In the Save preset dialog ("The current graph filter (hidden: 3; soloed: 0) is saved under a name, for this repository only."), type the Preset name (for example "Releases") and click Save.
- The preset appears in the Presets menu and on the button. Choose it whenever you want to go back to that filter.
The ready-made presets query the repository to find out the current branch, the upstream, the
target, the main branch and "my work" (a git log over what's outside the main branch, comparing
the author with your email). After that, they only change the graph filter's solo. Nothing is
changed in the repository.
turn off in the footer. With a ready-made preset, the branches hidden by hand stay hidden and the solo goes away; with a saved preset, the whole filter is cleared. Changing the filter by hand (eye, solo, show all) also turns the preset off.
- "No favorite branches yet. Use “Add to favorites” in a branch's menu."
- "The preset found no branches to show."
- "This repository has many commits outside the main branch: “Only my work” looked at the latest 20,000."
- "Couldn't compute the preset: …": git refused the query; its message comes along.
- When saving with a name that already exists: "Replace preset Releases?" ("A preset with this name already exists in this repository. Its filter will be replaced with the current one.") with the Replace button. Then, "Preset “Releases” saved." or "Preset “Releases” updated.".
- When deleting: "Delete preset Releases?" ("Only the saved preset is deleted. The filter currently applied to the graph stays as it is.") and "Preset “Releases” deleted.".
- In the palette, with no active filter, saving appears unavailable with "There's no filter to save: hide branches or solo one first."
- Presets, the preset in use and favorites are saved per repository.
- The "Favorites" section, below.
- Stacks: the Smart Branches target on a stack branch.
- The target button in the WORKTREES section shows in the graph only the worktree's branch and its upstream. See Create and open worktrees.
Mark as favorites the branches you always follow (main, develop, the release in progress). They
get a star in the panel and make up the Favorites preset.
Branch menu (local or remote) › Add to favorites / Remove from favorites.
- Right-click
release/1.4› Add to favorites. - Its row in the panel gets the star ("Favorite (Favorites preset)").
- Presets › Favorites shows in the graph only the favorites and the current branch.
- With the Favorites preset in use, marking or unmarking a favorite updates the graph right away.
- A deleted favorite is left out of the preset; the mark comes back if the branch is recreated.
When the graph seems to be "missing" commits, check the footer: it tells you about everything that's filtered.
| Where | What it clears |
|---|---|
| Footer › show all | The hidden branches and the solo. |
| Palette: "Show all branches in the graph" ("Clears hidden and solo branches") | The same. Unavailable with no active filter. |
| Footer › turn off | The preset in use. |
| Presets › All branches | The preset and the solo (the ones hidden by hand stay). |
| Footer › clear (next to "highlighting N authors") | The author filter. |
| Esc on the search bar | The search. |
- The commit graph: the footer in detail.