GitLens Documentation

GitLens Commit Graph

Last updated: August 2025

Commit Graph PRO

The GitLens Commit Graph provides an interactive view of your repository history. It shows commits, branches, and collaborators in one place, helping you understand contributions and make faster decisions.

Commit Graph in GitLens showing branches and commits
Commit Graph overview in GitLens

Open the Commit Graph

  1. Open the Command Palette:
    • macOS: Cmd + Shift + P
    • Windows/Linux: Ctrl + Shift + P
  2. Type Show Commit Graph and select it.

The Commit Graph opens in a new tab, where you can scroll through history and resize column widths.

GIF showing how to open the Commit Graph from the Command Palette
Opening the Commit Graph from the Command Palette

Repository Information

At the top of the Commit Graph, you’ll see:

  • Repository name
  • Checked-out branch (click to switch branches)
  • Last fetched time (click Fetch to update)
Repository details in the Commit Graph toolbar
Repository details in the Commit Graph toolbar

Availability

  • The Commit Graph is available to all users for public and local repositories.
  • A paid GitLens subscription or trial is required for use with private repositories.

Feedback

We’d love your input! Share ideas and feedback in the GitLens Commit Graph discussion on GitHub.

Configuration and Layout

You can configure the Commit Graph to control what information is shown and how it is displayed.

Columns

  • Drag and drop column headers to rearrange columns.
  • Right-click a column header to toggle columns on or off.
  • The Changes column shows added lines in green and deleted lines in red.
Commit Graph column settings menu showing toggle options
Commit Graph column settings

Layout Options

  • Panel Layout: Displays the Commit Graph in the bottom panel (near the Terminal) with a details view alongside it.
  • Editor Layout: Opens the Commit Graph in an editor tab.
  • You can open the Commit Graph in both layouts simultaneously.

To switch layouts:

  1. Select the settings gear in the top-right corner of the Commit Graph editor.
  2. Choose Prefer Commit Graph in Panel Layout or Prefer Commit Graph in Editor Area.
Commit Graph layout preference menu
Switching between Editor and Panel Layout

Compact Graph Layout

  • Right-click the Graph column header and select Compact Graph Column Layout to reduce visual complexity.
  • When the Author column is resized to minimum width, it shows avatars instead of text.
  • Columns that become too narrow automatically switch to icons to preserve information.
Compact Commit Graph layout with icons and avatars
Compact Graph and Author column with avatars

Scroll Markers

Scroll markers highlight key points in the Commit Graph, including:

  • Checked-out branches
  • Selected rows
  • Search results

Use scroll markers to quickly jump to important points such as HEAD or refs. You can toggle this feature in the Commit Graph settings.

Commit Graph scroll markers indicating branch and search results
Scroll markers in the Commit Graph

Settings

Adjust Commit Graph settings from the Command Palette:

  • macOS: Cmd + Shift + P
  • Windows/Linux: Ctrl + Shift + P

Search for GitLens: Open Settings.

Commit Graph settings in VS Code
Opening Commit Graph settings

Rich Commit Search

The Commit Graph supports rich search across your entire repository. You can search by commit, message, author, file, or even specific code changes.

How to Search

  1. Type search criteria in the search bar.
  2. Use the arrow icons or keyboard shortcuts to navigate results:
    • Next result: F3 (Windows/Linux) or Cmd + G (macOS)
    • Previous result: Shift + F3 (Windows/Linux) or Shift + Cmd + G (macOS)
Commit Graph search bar highlighting results
Searching commits in the Commit Graph

You can also:

  • Jump to the first or last result by holding Shift while clicking the arrow icons.
Navigating commit search results with arrow keys
Navigating commit search results

Search Filters

Use these filters in the search bar:

  • Commit:
  • Message:
  • Author:
  • File:
  • Change:
  • @me

Additional options:

  • Match all
  • Match case
  • Use regular expressions
Commit Graph search options for case sensitivity and regex
Commit Graph search options

Full Context Menu Support

You can right-click a branch, commit, tag, author, or column header (Author, Commit Date/Time, or SHA) to access context menu actions.

Context menu in Commit Graph with options for branches, commits, and authors
Commit Graph context menu options

Helpful context menu actions include:

  • Compare with Common Base: Review changes that would occur if the selected branch were merged by comparing its common ancestor (merge base) with the current branch.
  • Open All Changes with Common Base: Review all merge changes in the multi-diff editor.

Pull Request Information

For GitHub and GitLab, the Commit Graph displays a Pull Request icon for any branch with an open pull request. To enable this, connect a rich integration.

Commit Graph branch showing pull request icon
Pull request icon in Commit Graph

Hiding Remotes, Branches, or Tags

The Commit Graph shows refs to your remotes, branches, and tags.

  • Hover over any ref to use the Hide option.
  • To show them again, hover over the Hide option at the top of the Commit Graph and select the desired refs.
Hiding refs from the Commit Graph view
Hiding refs in the Commit Graph

Filter Options

Access filters from the dropdown menu to choose:

  • Show Current Branch Only: Displays the current branch and its upstream remote.
  • Show All Local Branches (default).

Additional options let you hide or show:

  • Remote-only branches
  • Stashes
  • Tags

You can also dim merge commit rows for clarity.

Commit Graph filter options for branches, tags, and stashes
Commit Graph filter options

Minimap (Experimental)

The Minimap provides a high-level overview of repository activity. It shows commits, branches, HEAD/upstream, and more, letting you quickly jump to points of interest.

  • Select the Toggle Minimap icon in the Commit Graph toolbar to enable or disable it.
  • Use the graph icon dropdown to switch between Commits or Lines Changed views.
  • Toggle markers on or off from the same menu.
Commit Graph Minimap enabled in the toolbar
Commit Graph Minimap
Commit Graph Minimap settings with commits or lines changed options
Minimap settings and options

Minimap Overview

  • Reads left to right: Left = most recent, right = older.
  • Highlighted region: Area currently in view.
  • Green lines: HEAD.
  • Yellow lines: Search results.
  • Upper row markers:
    • Blue blocks = remote branches
    • Brown blocks = tags
  • Lower row markers:
    • Pink blocks = stashes
    • Blue blocks = local branches

Note: We’d love your feedback on the Minimap. Please share it on the GitHub Discussion board.

Have feedback about this article? Did we miss something? Let us know!
On this page