Features marked with PRO
require a trial or paid plan for use on privately hosted repos
Features marked with PREVIEW
require a GitKraken Account, with access level based on your plan, e.g. Community, Pro, etc
Revision Navigation
- Adds an Open Changes with Previous Revision command (
gitlens.diffWithPrevious
) to compare the current file or revision with the previous commit revision - Adds an Open Changes with Next Revision command (
gitlens.diffWithNext
) to compare the current file or revision with the next commit revision - Adds an Open Line Changes with Previous Revision command (
gitlens.diffLineWithPrevious
) to compare the current file or revision with the previous line commit revision - Adds an Open Changes with Working File command (
gitlens.diffWithWorking
) to compare the current revision or most recent commit revision of the current file with the working tree - Adds an Open Line Changes with Working File command (
gitlens.diffLineWithWorking
) to compare the commit revision of the current line with the working tree - Adds an Open Changes with Branch or Tag… command (
gitlens.diffWithRevisionFrom
) to compare the current file or revision with another revision of the same file on the selected reference - Adds an Open Changes with Revision… command (
gitlens.diffWithRevision
) to compare the current file or revision with another revision of the same file
Current Line Blame
Adds an unobtrusive, customizable, and themable, blame annotation at the end of the current line.
- Contains the author, date, and message of the current line’s most recent commit (by default)
- Adds a Toggle Line Blame Annotations (
gitlens.toggleLineBlame
) to toggle the blame annotation on and off
Git CodeLens
Adds Git authorship CodeLens to the top of the file and on code blocks (optional, on by default)
-
Recent Change — author and date of the most recent commit for the file or code block
- Click the CodeLens to show a commit file details quick pick menu with commands for comparing, navigating and exploring commits, and more (by default)
-
Authors — number of authors of the file or code block and the most prominent author (if there is more than one)
- Click the CodeLens to toggle the file Git blame annotations on and off of the whole file (by default)
- Will be hidden if the author of the most recent commit is also the only author of the file or block, to avoid duplicate information and reduce visual noise
-
Provides customizable click behavior for each CodeLens — choose between one of the following
- Toggle file blame annotations on and off
- Compare the commit with the previous commit
- Show a quick pick menu with details and commands for the commit
- Show a quick pick menu with file details and commands for the commit
- Show a quick pick menu with the commit history of the file
- Show a quick pick menu with the commit history of the current branch
-
Adds a Toggle Git CodeLens command (
gitlens.toggleCodeLens
) with a shortcut ofshift+alt+b
to toggle the CodeLens on and off
Status Bar Blame
Adds a customizable Git blame annotation showing the commit and author who last modified the current line to the status bar (optional, on by default)
-
Contains the commit author and date (by default)
-
Click the status bar item to show a commit details quick pick menu with commands for comparing, navigating and exploring commits, and more (by default)
-
Provides customizable click behavior — choose between one of the following
- Toggle file blame annotations on and off
- Toggle CodeLens on and off
- Compare the line commit with the previous commit
- Compare the line commit with the working tree
- Show a quick pick menu with details and commands for the commit (default)
- Show a quick pick menu with file details and commands for the commit
- Show a quick pick menu with the commit history of the file
- Show a quick pick menu with the commit history of the current branch
Hovers
Current Line Hovers
Adds customizable Git blame hovers accessible over the current line
Details Hover
Adds a details hover annotation to the current line to show more commit details (optional, on by default)
- Provides automatic issue linking to Bitbucket, Gerrit, Gitea, GitHub, GitLab, and Azure DevOps in commit messages
- Provides a quick-access command bar with Open Changes, Blame Previous Revision, Open on Remote, Invite to Live Share (if available), and Show More Actions command buttons
- Click the commit SHA to execute the Show Commit command
Changes (diff) Hover
Adds a changes (diff) hover annotation to the current line to show the line’s previous version (optional, on by default)
- Click the Changes to execute the Open Changes command
- Click the current and previous commit SHAs to execute the Show Commit command
Annotation Hovers
Adds customizable Git blame hovers accessible when annotating
Details Hover
Adds a details hover annotation to each line while annotating to show more commit details (optional, on by default)
- Provides automatic issue linking to Bitbucket, Gerrit, Gitea, GitHub, GitLab, and Azure DevOps in commit messages
- Provides a quick-access command bar with Open Changes, Blame Previous Revision, Open on Remote, Invite to Live Share (if available), and Show More Actions command buttons
- Click the commit SHA to execute the Show Commit command
Changes (diff) Hover
Adds a changes (diff) hover annotation to each line while annotating to show the line’s previous version (optional, on by default)
- Click the Changes to execute the Open Changes command
- Click the current and previous commit SHAs to execute the Show Commit command
File Blame
Adds on-demand, customizable, and themable, file blame annotations to show the commit and author who last modified each line of a file
- Contains the commit message and date, by default
- Adds a heatmap (age) indicator on right edge (by default,) of the file to provide an easy, at-a-glance way to tell how recently lines were changed (optional, on by default)
- See the file heatmap section below for more details
- Adds a Toggle File Blame Annotations command (
gitlens.toggleFileBlame
) with a shortcut of alt+b to toggle the blame annotations on and off - Press Escape to turn off the annotations
File Changes
Adds an on-demand, customizable, and themable, file changes annotation to highlight any local (unpublished) changes or lines changed by the most recent commit.
- Adds Toggle File Changes command (
gitlens.toggleFileChanges
) to toggle the changes annotations on and off - Press Escape to turn off the annotations
File Heatmap
Adds an on-demand heatmap to the edge of the file to show how recently lines were changed
- The indicator’s customizable color will either be hot or cold based on the age of the most recent change (cold after 90 days by default)
- The indicator’s brightness ranges from bright (newer) to dim (older) based on the relative age, which is calculated from the median age of all the changes in the file
- Adds Toggle File Heatmap Annotations command (
gitlens.toggleFileHeatmap
) to toggle the heatmap on and off - Press Escape to turn off the annotations
Code Suggest PREVIEW
GitKraken Code Suggest simplifies code review by allowing you to make suggestions and edits across the entire project, not just on the lines that were changed, within GitLens, GitKraken Desktop, and gitkraken.dev. When a Pull Request is open, you can make suggestions to the pull request that others can then review and accept to include in the pull request.
Note: Code Suggest is currently only available for repositories on github.com.
To begin suggesting changes, open the GitLens Inspect Overview for the desired repository and checkout a branch that has an open pull request. From here, you will have the option to Start Review for PR #PR. You may begin modifying and saving any file you would like to include in the code suggestion. Once you are ready, select Suggest Changes for PR, provide a title, and then finish with Create Code Suggestion.
This will include a comment on the pull request with two options: you can select Code Suggestion for #PR to open the suggestion in gitkraken.dev or select locally on your machine to open the suggestion in GitKraken or GitLens.
When selecting locally on your machine you can open them on GitLens or GitKraken Desktop. Here, you can review the changes by selecting each file and once you are ready, you can select Apply to apply to the branch you currently have checked out or select the dropdown and then Apply to a Branch to apply to a new branch or select an existing branch. This will apply the patch locally.
When selecting the Code Suggestion for #PR you will be taken to gitkraken.dev to review and accept the changes. Here, you can review the changes by selecting each file and once you are ready, you can select Commit Suggestions. This will create a new commit on the remote for the existing branch (shown under COMMIT SUGGESTIONS TO).
Cloud Patches PREVIEW
What are Cloud Patches and why would you want to use them
A Cloud Patch is a Git patch that GitKraken securely stores for you so it can be easily shared with others across GitLens, GitKraken Desktop, and the GitKraken CLI. The patch is directly transferred from your machine into secure storage.
Cloud Patches allow the ability to engage early with your team before a pull request. They can be created as soon as you have a work in progress. This can help with collaborating on changes prior to a pull request and minimize the delay of pull request reviews.
How to setup Cloud Patches
To enable Cloud Patches per client, open the user Settings (command/ctrl + shift + P
> Preferences: Open User Settings (JSON)
) and set gitlens.cloudPatches.enabled
to true
– this is on by default. To disable Cloud Patches per client, set this setting to false
.
How to work with Cloud Patches
Cloud Patches can be managed from the Cloud Patches view in the GitLens side bar.
A Cloud Patch can be created from Working Changes, Commits, Stashes or Comparisons by using the “Share as Cloud Patch” option from the command palette or from the Share submenu in applicable gitlens views.
When creating a Cloud Patch, you have the following sharing options:
-
Anyone with the link
: Anyone that you share the public link with will be able to work with the Cloud Patch. -
Anyone in my org
: Anyone in the GitKraken Organization will be able to work with the Cloud Patch. They will be required to authenticate with a GitKraken account to access it. -
Only collaborators
: Only users in the GitKraken Organization who have been selected when sharing will be able to work with the Cloud Patch. They will be required to authenticate with a GitKraken account to access it. SelectInvite
to select desired members.
Cloud Patches shared with you can be viewed in the Cloud Patches section under Shared with Me
.
Note: If you have multiple organizations, you can easily switch between them from the GitKraken Account view.
Cloud Patches can be viewed from URLs shared to you and they can be applied to your working tree or to a new or existing branch. Simply select or open the link and then follow the prompts within GitLens to apply the Cloud Patch.
To delete a cloud patch, right-click it and select Delete Cloud Patch...
.
Self-Hosting Cloud Patch data
If you do not want your Cloud Patch data stored on GitKraken Servers, we offer the ability for you to host Cloud Patches on your own AWS S3 storage instance. For more information on configuring this, see our documentation here.
Commit Graph PRO
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 or trial 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 gear located at the top right of the editor. From there, select the “Prefer Commit Graph in Panel Layout” or “Prefer Commit Graph in Editor Area”. The Commit Graph can also be opened in both the Penel Layout and Editor Area simultaneously.
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.
Helpful context menu actions:
- Compare with Common Base: to review the changes if the selected branch were to be merged by comparing the common ancestor (merge base) with the current branch to the selected branch
- Open All Changes with Common Base: to review the changes if the selected branch were to be merged in the multi-diff editor
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.
The Minimap can be toggled between showing commits or lines changed by selecting the graph icon dropdown in the top right of the Activity Minimap. Additionally, markers can be toggled on or off from here.
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.
Launchpad PRO
The Launchpad organizes pull requests by status allowing you to identify bottlenecks and take actions on them. This offers the ability to organize and quickly take actions on pull requests with priority.
Currently, this view is supported for GitHub.com and GitLab.com repositories. In order to see the Launchpad, you will need to connect the GitHub Integration .
The Launchpad can be accessed from the command palette (command/ctrl + shift + P
) by searching GitLens: Open Launchpad
or select the Pull Request from the status bar in VS Code.
Here you can see a list of all pull requests for your repositories that are ready to merge, blocked, require follow-up, need your review, are waiting for a review, are a draft, or are snoozed. You can select the pull request to see more information about it and take action on it such as open it in a browser, merge (if ready to merge) or switch to the branch/worktree.
Code Suggestions can be easily started or reviewed from pull requests in the launchpad actions as well.
You can pin pull requests using the pin icon to move them to the pinned group or snooze them by selecting the snooze icon to move them into the snooze group. To unpin or unsnooze, select the pin or snooze icon again.
Note: The Launchpad 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.
Visual File History PRO
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.
AI-Generated Commit Messages (Preview) PRO
Commit messages can be automatically generated using an AI Provider.
To connect an AI Provider, 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 the AI Provider and the entry of your AI Provider key. The API key can be created from your AI Provider’s site. 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. There are additional gitlens.ai
settings that can be customized for the provider and model.
To remove your AI Provider API key in GitLens, run the command GitLens: Reset Stored AI Keys...
from the Command Palette.
Git Command Palette
Adds a customizable Git Command Palette command (gitlens.gitCommands
) to provide guided (step-by-step) access to many common Git commands, as well as quick access to commit history and search, stashes, and more
- Quickly navigate and execute Git commands through easy-to-use menus where each command can require an explicit confirmation step before executing
Quick Commit Access
- Adds a Show Branch History command (
gitlens.showQuickBranchHistory
) to show a quick pick menu to explore the commit history of the selected branch - Adds a Show Current Branch History command (
gitlens.showQuickRepoHistory
) to show a quick pick menu to explore the commit history of the current branch
- Adds a Show File History command (
gitlens.showQuickFileHistory
) to show quick pick menu to explore the commit history of the current file
Adds a Search Commits command (gitlens.showCommitSearch
) to show quick pick menu to search for commits
- by message — use
<message>
to find commits with messages that match<message>
— See Git docs - or, by author — use
@<pattern>
to find commits with authors that match<pattern>
— See Git docs - or, by commit SHA — use
#<sha>
to find a commit with id of<sha>
— See Git docs - or, by files — use
:<path/glob>
to find commits with file names that match<path/glob>
— See Git docs - or, by changes — use
~<pattern>
to find commits with differences whose patch text contains added/removed lines that match<pattern>
— See Git docs
- Adds a Show Commit command (
gitlens.showQuickCommitDetails
) to show a quick pick menu to explore a commit and take action upon it
Adds a Show Line Commit command (gitlens.showQuickCommitFileDetails
) to show a quick pick menu to explore a file of a commit and take action upon it
Quick Stash Access
- Adds a Show Stashes command (
gitlens.showQuickStashList
) to show a quick pick menu to explore your stashes
Quick Status Access
- Adds a Show Repository Status command (
gitlens.showQuickRepoStatus
) to show a quick pick menu to for visualizing the current repository status
Interactive Rebase Editor
Adds a user-friendly interactive rebase editor to more easily configure an interactive rebase session
- Quickly re-order, edit, squash, and drop commits
- Includes drag & drop support!
To use this directly from your terminal, e.g. when running git rebase -i
:
- set VS Code as your default Git editor
git config --global core.editor "code --wait"
- or, to only affect rebase, set VS Code as your Git rebase editor
git config --global sequence.editor "code --wait"
To use the Insiders edition of VS Code, replace code
in the above with code-insiders
Autolinks
Use autolinks to linkify external references, like Jira issues or Zendesk tickets, in commit messages.
Terminal Links
- Optionally adds autolinks for branches, tags, and commit ranges in the integrated terminal to quickly explore their commit history
- Optionally adds autolinks for commits in the integrated terminal to quickly explore the commit and take action upon it
Remote Provider Integrations
GitLens provides rich integrations with many remote providers, including GitHub, GitHub Enterprise, GitLab, Gitea, Gerrit, Bitbucket, Bitbucket Server, and Azure DevOps. You can also define custom remote providers or remote providers with custom domains as well.
Basic integrations provide issue and pull request auto-linking, while richer integrations (e.g. GitHub or GitLab) offer the ability to work with the Launchpad, can provide rich hover information provided for auto-linked issues and pull requests, associate pull requests with branches and commits, and provide avatars.
Additionally, these integrations provide commands to copy the url of or open, files, commits, branches, and the repository on the remote provider.
- Open File from Remote command (
gitlens.openFileFromRemote
) — opens the local file from a url of a file on a remote provider - Open File on Remote command (
gitlens.openFileOnRemote
) — opens a file or revision on the remote provider - Copy Remote File Url command (
gitlens.copyRemoteFileUrlToClipboard
) — copies the url of a file or revision on the remote provider - Open File on Remote From… command (
gitlens.openFileOnRemoteFrom
) — opens a file or revision on a specific branch or tag on the remote provider - Copy Remote File Url From… command (
gitlens.copyRemoteFileUrlFrom
) — copies the url of a file or revision on a specific branch or tag the remote provider - Open Commit on Remote command (
gitlens.openCommitOnRemote
) — opens a commit on the remote provider - Copy Remote Commit Url command (
gitlens.copyRemoteCommitUrl
) — copies the url of a commit on the remote provider - Open Branch on Remote command (
gitlens.openBranchOnRemote
) — opens the branch on the remote provider - Copy Remote Branch Url command (
gitlens.copyRemoteBranchUrl
) — copies the url of a branch on the remote provider - Open Branches on Remote command (
gitlens.openBranchesOnRemote
) — opens the branches on the remote provider - Copy Remote Branches Url command (
gitlens.copyRemoteBranchesUrl
) — copies the url of the branches on the remote provider - Open Comparison on Remote command (
gitlens.openComparisonOnRemote
) — opens the comparison on the remote provider - Copy Remote Comparison Url command (
gitlens.copyRemoteComparisonUrl
) — copies the url of the comparison on the remote provider - Open Pull Request command (
gitlens.openPullRequestOnRemote
) — opens the pull request on the remote provider - Copy Pull Request Url command (
gitlens.copyRemotePullRequestUrl
) — copies the url of the pull request on the remote provider - Open Repository on Remote command (
gitlens.openRepoOnRemote
) — opens the repository on the remote provider - Copy Remote Repository Url command (
gitlens.copyRemoteRepositoryUrl
) — copies the url of the repository on the remote provider
Connecting the GitHub and GitLab Integration
The GitHub and GitLab integration are connected via your GitKraken account from gitkraken.dev. To connect an integration, open the Command Palette (command/ctrl+shift+P
) and type GitLens: Manage Integrations
. You can also navigate to GitKraken Account in the GitLens Activity Bar and select Integrations
.
You will be prompted to log into your GitKraken account if you are not already. Then, select Connect with GitHub
or Connect with GitLab
and sign into the desired service. You will have the option to connect multiple integrations if needed. Finish the process by selecting Complete Setup
to hop back into VS Code and begin working with the integrations.
GitHub Enterprise Server and GitLab Self-Managed Integration PRO
GitLens Pro offers a richer integration with GitHub Enterprise Server and GitLab Self-Managed.
Once authenticated, GitLens will enrich GitHub Enterprise Server or GitLab Self-Managed autolinks in the hovers. You’ll see your GitHub Enterprise Server 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.
Connecting GitHub Enterprise Server or GitLab Self-Managed
To connect either the GitHub Enterprise Server or GitLab Self-Managed integration:
-
Open the
settings.json
– this can be done from the command palette (command/ctrl + shift + P
) > Preferences: Open User Settings (JSON) -
Provide a gitlens.remote with a domain and a type with the below format – for more information on the formatting see the remote provider integration settings
Format Example:
"gitlens.remotes": [{ "domain": "git.corporate-url.com", "type": "GitHub" }]
Or
"gitlens.remotes": [{ "domain": "git.corporate-url.com", "type": "GitLab" }]
-
Open a GitHub Enterprise Server or GitLab Self-Managed repository in VS Code
-
Open the Remotes View
-
Select Connect to Remote – if you do not see this option, check that the format of the settings.json matches the example above
- You will then be prompted to provide a PAT with the required scopes and can hit Enter to complete the integration connection
Jira Integration
The Jira Integration connected through your GitKraken Account gives you access to Jira Autolinks anywhere autolinks are supported in GitLens. Simply connect the integration and GitLens will automatically convert Jira IDs in commit messages to links i.e. ABC-123
.
To connect the integration, open the GitLens Sidebar, select Cloud Integrations
from the GitKraken Account view, select Jira Cloud, and proceed with the integration connection by allowing GitKraken access to your Atlassian Account. You can also open gitkraken.dev/settings/integrations in a browser.
Powerful Commands
-
Adds an Add Co-authors command (
gitlens.addAuthors
) to add a co-author to the commit message input box -
Adds a Copy SHA command (
gitlens.copyShaToClipboard
) to copy the commit SHA of the current line to the clipboard or from the most recent commit to the current branch, if there is no current editor -
Adds a Copy Message command (
gitlens.copyMessageToClipboard
) to copy the commit message of the current line to the clipboard or from the most recent commit to the current branch, if there is no current editor -
Adds a Copy Current Branch command (
gitlens.copyCurrentBranch
) to copy the name of the current branch to the clipboard -
Adds a Switch to Another Branch (
gitlens.views.switchToAnotherBranch
) command — to quickly switch the current branch -
Adds a Compare References… command (
gitlens.compareWith
) to compare two selected references -
Adds a Compare HEAD with… command (
gitlens.compareHeadWith
) to compare the index (HEAD) with the selected reference -
Adds a Compare Working Tree with… command (
gitlens.compareWorkingWith
) to compare the working tree with the selected reference -
Adds an Open Changes (difftool) command (
gitlens.externalDiff
) to open the changes of a file or set of files with the configured git difftool -
Adds an Open All Changes (difftool) command (
gitlens.externalDiffAll
) to open all working changes with the configured git difftool -
Adds an Open Directory Compare (difftool) command (
gitlens.diffDirectoryWithHead
) to compare the working tree with HEAD with the configured Git difftool -
Adds an Open Directory Compare (difftool) with… command (
gitlens.diffDirectory
) to compare the working tree with the selected reference with the configured Git difftool -
Adds an Open File command (
gitlens.openWorkingFile
) to open the working file for the current file revision -
Adds an Open Revision… command (
gitlens.openFileRevision
) to open the selected revision for the current file -
Adds an Open Revision from… command (
gitlens.openFileRevisionFrom
) to open the revision of the current file from the selected reference -
Adds an Open Blame Prior to Change command (
gitlens.openBlamePriorToChange
) to open the blame of prior revision of the selected line in the current file -
Adds a Open Changed Files command (
gitlens.openChangedFiles
) to open any files with working tree changes -
Adds a Close Unchanged Files command (
gitlens.closeUnchangedFiles
) to close any files without working tree changes -
Adds an Enable Debug Logging command (
gitlens.enableDebugLogging
) to enable debug logging to the GitLens output channel -
Adds a Disable Debug Logging command (
gitlens.disableDebugLogging
) to disable debug logging to the GitLens output channel -
Adds a Copy as Patch context menu command (
gitlens.copyPatchToClipboard
) on files, commits, stashes, and comparisons in GitLens views. Additionally, this context menu command can be used on files in the Changes and Staged Changes groups as well as the groups themselves in the Source Control view -
Adds a Apply Copied Patch command (
gitlens.applyPatchFromClipboard
) in the command palette to apply a patch from the clipboard
Deep Links
Deep Links are links that can be used to quickly open up a resource within GitLens. With Deep Linking support, you can improve collaboration and communication by seamless sharing important information related to your Git repositories via a link. There are many resources in GitLens that offer the ability to generate Deep Links:
- Search & Compare: Link directly into comparisons in the Search & Compare view for viewing comparisons between branches, tags, and commits. To generate a Deep Link, right-click a comparison, hover over Share, and select Copy Link to Comparison.
- GitKraken Workspaces: Link directly to a GitKraken Workspace. To generate a Deep Link, right-click a Workspace, hover over Share, and select Copy Link to Workspace.
- Commit Graph: Link to open up a resource within the Commit Graph of GitLens such as 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 .
- Files or Lines: Link directly to files or lines of code. To generate a Deep Link, right-click highlighted lines of code or a file, hover over Share and select Copy vscode.dev Link.
- Cloud Patches: Link directly to open up a Cloud Patch. To generate a Deep Link, generate a Cloud Patch and select Copy Link from the success prompt.
Menus & Toolbars
GitLens provides customizable menu and toolbar contributions to put you in control over where GitLens’ commands are shown. The easiest way to configure these settings is via the GitLens interactive settings editor.
For example, if you uncheck the Add to the editor group toolbar you will see the following items removed from the toolbar:
You can also expand each group to control each area more granularly.
Modes
GitLens supports user-defined modes for quickly toggling between sets of settings.
- Adds the active mode to the status bar (optional, on by default)
- Adds Toggle Review Mode command (
gitlens.toggleReviewMode
) to toggle Review mode
- Adds Toggle Review Mode command (
- Adds Switch Mode command (
gitlens.switchMode
) to quickly switch the active mode - Adds a Zen mode which for a zen-like experience, disables many visual features
- Adds Toggle Zen Mode command (
gitlens.toggleZenMode
) to toggle Zen mode
- Adds Toggle Zen Mode command (
- Adds a Review mode which for reviewing code, enables many visual features
Experimental Multi-diff Editor
You can open changes in VS Code’s new multi-diff editor. This requires VS Code 1.86 or later.
Commands using Multi-diff
Open Folder Changes with Revision...
andOpen Folder Changes with Branch or Tag...
commands using the Command Palette as well as the Explorer and Source Control views- An inline
Open All Changes
command for commits, stashes, and comparisons in the views Open All Changes
andOpen All Changes with Working Tree
will use the new multi-diff editor when enabledOpen All Changes, Individually
andOpen All Changes with Working Tree, Individually
commands were added to provide access to the previous behavior