GitLens Documentation

Install   
GitLens+ Support
GitHub.com Issues  
GitHub.com Discussions  
GitKraken.com  

GitLens+ Features

GitLens+ features are available for all users on GitLens version 13+ working with public or local repositories. To work with these features on a private repository, you will need a paid plan.

The introduction of GitLens+ has no impact on existing GitLens features. You’re not losing access to any of the features you know and love. In fact, more core features will continue to be added to GitLens that enable you to get even more out of Git in VS Code!


Commit Graph

The commit graph helps visualize your repository commit history and give you information about branches, commits, and collaborators all in one view. This makes it easier to see contributions and help you make faster, more informed decisions.

To open the Commit Graph, open the command palette using the keyboard shortcut Cmd/ctrl + Shift + P and type “Show Commit Graph”. This will open a new tab and render your current repo’s commit history, where you may scroll through your history and resize any of the columns widths.

At the top of the commit graph the repository name, the branch name that is currently checked out, and the last fetched time is shown. This section offers the ability to switch branches by selecting the branch name and the ability to fetch by selecting "Fetch".

Note: The Commit Graph is available to all users working on public repositories, and requires no account. Additionally, users with a paid GitLens+ subscription can use the Commit Graph with private repos.

We’d love to hear your feedback in the Commit Graph discussion on GitHub.

Configuration and Layout

The commit graph can be configured to be shown as desired offering different settings for what to show and how or where to show it.

All columns can be rearranged by dragging and dropping the column headers. The columns can be toggled on/off from the column’s context menu via right-click. This enables you to arrange the columns in a way that best suits your workflow and priorities. The Changes column represents added (green) and deleted (red) lines made to each file within the commit.

A Commit Graph Panel Layout is offered to show the Commit Graph in the bottom Panel (near the Terminal) with a dedicated Commit Graph Details view alongside the Commit Graph. To switch between the Editor Layout and Panel Layout, select the Commit Graph settings cog located at the top right of the editor. From there, select the "Switch Commit Graph to Panel Layout" or "Switch Commit Graph to Editor Layout".

A compact layout for the Graph column is offered in the Commit Graph to reduce the visual complexity and size of the Graph column. To enable the compact layout, right click on the Graph column header, and select the Compact Graph Column Layout option. Additionally the Author column displays avatars instead of text when sized to its minimum width, which pairs nicely with the compact Graph column as you can retain avatars. Also, when the any of the Commit Graph columns are resized small enough so that their text would be truncated, they switch to displaying icons to ensure that crucial information remains visible, even in constrained display settings.

The scroll markers indicate points of interest on the commit graph such as checked-out branches, selected rows, and search results. This provides the ability to jump to important points like the HEAD or refs. This can be toggled on or off in the Commit Graph settings.

Settings

The Commit Graph settings can be adjusted by opening the Command Palette (command/ctrl + shift + P) and searching "GitLens: Open Settings".

Rich Commit Search

The Commit Graph will highlight all matching results across your entire repository when searching for a commit, message, author, a changed file or files, or even a specific code change. Use shortcut keys or the up/down arrows on the search bar to navigate the search results; F3 (also Cmd+G on macOS) goes to the next result from your selection while Shift+F3 ( also Shift+Cmd+G on macOS) goes to the previous.

Once you type search filtering criteria, use the arrow icons to move through each result. Additionally, you can quickly jump to the first or last result, by holding Shift while clicking on the up/down arrows respectively.

The following options can be used to search:

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

Additionally, the options on the right side of the search bar can be used to match all, match case, or use regular expression.

Full Context Menu Support

You can right-click a branch, commit, tag, author, or column headers (author, commit date / time, or SHA) to interact with them.

Context menu actions include but are not limited to:

  • Switch to Branch
  • Revert Commit
  • Switch to Commit
  • Create Branch
  • Merge
  • Rebase
  • Create Worktree
  • Create Pull Request

Pull Request Information

For GitHub and GitLab, the commit Graph will display a Pull Request icon for any branch that currently has a pull request. You will need to connect the rich integration in order to see this.

Hiding Remotes, Branches or Tags

The Commit Graph shows refs to your remotes, branches and tags. Hover over any of these refs to access the “Hide” option to help focus your Commit Graph. To show them again, hover over the "Hide" option at the top of the commit graph and select the desired refs.

Filter options can be accessed from the filter dropdown. This provides the ability to switch between Show Current Branch Only – to show the current branch and its upstream remote – or Show All Local Branches – this is selected by default. Additionally, remote-only branches, stashes and tags can be hidden/shown and merge commit rows can be dimmed.

Minimap (Experimental)

The Minimap provides an additional dimension to the Commit Graph. You can quickly see the activity of the repository, see the HEAD/upstream, branches (local and remote), and easily jump to them. Select the Toggle Minimap icon in the right corner of the Commit Graph top bar to toggle the Minimap on and off.

Minimap Overview:

  • Reads left to right – left is the most recent and the right is older
  • Highlighted region: Commit Graph area that is 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 would love to hear your feedback regarding the Minimap. Please share it on the GitHub Discussion board.

Deep Linking

Deep Links are links that can be used to open up a resource within the Commit Graph of GitLens. This provides the ability to easily share specific remote repositories, commits, branches, and tags. To generate a deep link right-click the desired resource, hover over Share and select Copy Link to <resource>.


Focus View

The Focus View allows you to stream line your workflow by providing a summarized list of your pull requests and your issues. To open the Focus View, open the command palette (command/ctrl + shift + P) and search GitLens+: Show Focus view.

Currently, this view is supported for GitHub repositories. In order to see the Focus View, you will need to connect the GitHub Integration.

The Focus View includes the following sections:

  • My Pull Requests: Shows all PRs opened by you, assigned to you, or awaiting your review
  • My Issues: Shows all issues created by you, assigned to you, or that mention you.

The Focus View offers the ability to create or open a worktree or branch from Pull Requests using the arrow and folder icon.

Note: The Focus View is currently organized by prioritizing items on the list that require more action by elevating them to the top. This is subject to change in the future.


Worktrees

Create Git Worktrees that allow multiple branches to be checked-out at once on the same repository. This makes it easier to develop on, or test multiple branches, by minimizing the context switching between branches.


Visual File History

The Visual File History allows you to quickly see the evolution of a file, including when changes were made, how large they were, and who made them.

Authors who have contributed changes to the file are on the left y-axis to create a swim-lane of their commits over time (the x-axis). Commit are plotted as color-coded (per-author) bubbles, whose size represents the relative magnitude of the changes.

Additionally, each commit’s additions and deletions are visualized as color-coded, stacked, vertical bars, whose height represents the number of affected lines (right y-axis). Added lines are shown in green, while deleted lines are red.

Gain additional insights on hover.


Single Sign On

Single Sign on offers a secure and easy way to sign into your account. To configure Single Sign On for your organization, refer to the Single Sign On guide here.

Requirements and Configuration

Your GitKraken account may initiate an Oauth authentication flow with the following supported Identity Providers (IdPs):

  • Azure Active Directory
  • Okta
  • Google Identity Platform
  • Ping Identity

Please note that your IdP will first need to be configured before setting up the connection in your GitKraken account. For assistance, please contact your IdP administrator or consult the IdP documentation for help.

Additional requirements:

Signing in with Single Sign On

GitLens+ users will see the option to Sign in with SSO from the login screen.

After clicking “Sign in with SSO”, the SSO form will open and ask for an email address to use for SSO login. The app will then check the email and determine whether the email address belongs to a single IdP for SSO. When the email address is successfully identified, the user will be taken to that IdP to login.


GitHub Enterprise and GitLab Self-Managed Integration

GitLens+ offers a richer integration with GitHub Enterprise and GitLab Self-Managed.

Once authenticated, GitLens will enrich GitHub Enterprise or GitLab Self-Managed autolinks in the hovers. You’ll see your GitHub Enterprise or GitLab Self-Managed avatar, links to related pull requests, along with a footnote of the pull request or issue details. You’ll see similar details from the Sidebar views for any commit or branch associated with a pull request or issue.

See the remote provider integration settings to configure these integrations.


AI-Generated Commit Messages (Experimental)

Commit messages can be automatically generated using OpenAI.

To connect OpenAI, stage some changes you want to generate a commit message for and then run the GitLens: Generate Commit Message (Experimental) command from the Command Palette (command/ctrl + shift + P). From there you will be guided through the process of accepting to send the diff of your staged changes to OpenAI and the entry of your OpenAI key. The OpenAI API key can be created here. Once completed, the generated commit message will be entered into the commit input box on the Source Control sidebar. You can also enter additional context about your changes in the commit box and those will also be sent to help generate a better message. Additionally, you can customize the gitlens.experimental.generateCommitMessagePrompt setting to control the prompt used to structure and format the generated commit message.

To remove your OpenAI API key in GitLens, run the command GitLens: Reset Stored OpenAI Key from the Command Palette.

FAQ

What are GitLens+ features?

Initially, in GitLens 12 we introduced new GitLens+ features that include Worktrees and Visual File History. Later we added the Commit Graph, see above all the additions we have made, with more to come!

What is GitLens+?

GitLens+ is a set of exciting new visualization and code collaboration capabilities designed to help devs code faster and more efficiently solo or as a team. These additional features can be used indefinitely with public repositories for any user without or with a GitLens account. You’ll also be able to test drive GitLens+ features with private repos as part of your automatic 7-day free trial of GitLens+ Pro.

Is GitLens still free?

Yes, GitLens is free. All core features will continue to be free without an account. In fact, we’re still adding many core features to GitLens. GitLens+ features are purely additive and provide a richer, more powerful experience.

Is GitLens+ free?

GitLens+ requires a paid license when working with private repoistories. For local and public repositories it is free. To summarize:

  • GitLens is free, no account required, and can be used on any local repository.
  • GitLens+ features on local & public repositories are also free.
  • GitLens+ features on private repositories require a Pro plan (or greater), view pricing here.
Have feedback about this article? Did we miss something? Let us know!
On this page