GitLens supercharges the Git capabilities built into Visual Studio Code. It helps you to visualize code authorship at a glance via Git blame annotations and code lens, seamlessly navigate and explore Git repositories, gain valuable insights via powerful comparison commands, and so much more.

Settings

For advanced customizations, refer to the GitLens docs and edit your User Settings

Adds an unobtrusive blame annotation at the end of the current line

Use the GitLens: Toggle Line Blame Annotations command to override this setting for the current window

Example:

When enabled the annotation can be scrolled into view when it is outside the viewport.

Setting this to false will inhibit the hovers from showing over the annotation; Set gitlens.hovers.currentLine.over to line to enable the hovers to show anywhere over the line.

For more options, open Settings and search for gitlens.currentLine

Adds authorship code lens to the top of files and on code blocks

Use the GitLens: Toggle Git Code Lens command to override this setting for the current window

At the top of the file

At the start of modules, classes, interfaces, etc

At the start of functions, methods, etc

For more options, open Settings and search for gitlens.codeLens

Adds a Git blame annotation about the current line to the status bar

Example:

Avoids clearing the previous blame information when changing lines to reduce status bar "flashing"

For more options, open Settings and search for gitlens.statusBar

Adds detailed blame information accessible via hovers

For more options, open Settings and search for gitlens.hovers

Views

Adds rich views to visualize, navigate, and explore

GitLens views can be configured to be shown in different side bar layouts to best match your workflow

Source Control Layout (default)

Shows all the views together on the Source Control side bar

GitLens Layout

Shows all the views together on the GitLens side bar

You can also simply drag & drop individual views to create custom layouts

Commits view

Adds a Commits view to visualize, explore, and manage Git commits

Requires a connection to a supported remote service (e.g. GitHub)

Chooses the best layout based on the number of files at each nesting level

Compacts (flattens) unnecessary nesting when using a tree layouts

Example:
Example:

For more options, open Settings and search for gitlens.views.commits or gitlens.views

Repositories view

Adds a Repositories view, hidden by default, to visualize, explore, and manage Git repositories

Requires a connection to a supported remote service (e.g. GitHub)

Chooses the best layout based on the number of files at each nesting level

Compacts (flattens) unnecessary nesting when using a tree layouts

For more options, open Settings and search for gitlens.views.repositories or gitlens.views

File History view

Adds a File History view to visualize, navigate, and explore the revision history of the current file, a specified file or folder, or just the selected lines of the current file

Chooses the best layout based on the number of files at each nesting level

Compacts (flattens) unnecessary nesting when using a tree layouts

For more options, open Settings and search for gitlens.views.fileHistory or gitlens.views

Line History view

Adds a Line History view, hidden by default, to visualize, navigate, and explore the revision history of the selected lines of current file

For more options, open Settings and search for gitlens.views.lineHistory or gitlens.views

Branches view

Adds a Branches view to visualize, explore, and manage Git branches

Requires a connection to a supported remote service (e.g. GitHub)

Chooses the best layout based on the number of files at each nesting level

Compacts (flattens) unnecessary nesting when using a tree layouts

For more options, open Settings and search for gitlens.views.branches or gitlens.views

Remotes view

Adds a Remotes view to visualize, explore, and manage Git remotes and remote branches

Requires a connection to a supported remote service (e.g. GitHub)

Chooses the best layout based on the number of files at each nesting level

Compacts (flattens) unnecessary nesting when using a tree layouts

For more options, open Settings and search for gitlens.views.remotes or gitlens.views

Stashes view

Adds a Stashes view to visualize, explore, and manage Git stashes

Chooses the best layout based on the number of files at each nesting level

Compacts (flattens) unnecessary nesting when using a tree layouts

Example:
Example:

For more options, open Settings and search for gitlens.views.stashes or gitlens.views

Tags view

Adds a Tags view to visualize, explore, and manage Git tags

Chooses the best layout based on the number of files at each nesting level

Compacts (flattens) unnecessary nesting when using a tree layouts

For more options, open Settings and search for gitlens.views.tags or gitlens.views

Contributors view

Adds a Contributors view, hidden by default, to visualize, navigate, and explore contributors

Requires a connection to a supported remote service (e.g. GitHub)

Chooses the best layout based on the number of files at each nesting level

Compacts (flattens) unnecessary nesting when using a tree layouts

For more options, open Settings and search for gitlens.views.contributors or gitlens.views

Search & Compare view

Adds a Search & Compare view to search and explore commit histories by message, author, files, id, etc, or visualize comparisons between branches, tags, commits, and more

Requires a connection to a supported remote service (e.g. GitHub)

Compacts (flattens) unnecessary nesting when using a tree layouts

For more options, open Settings and search for gitlens.views.searchAndCompare or gitlens.views

Gutter Blame

Adds on-demand gutter blame annotations for the whole file

Use the command to turn the annotations on or off

Press Esc to turn off the annotations

Example:

Indicator color reflects the age of the most recent change (hot or cold), while indicator brightness ranges from bright (newer) to dim (older) based on the relative age

Compacts (deduplicates) matching adjacent blame annotations

For more options, open Settings and search for gitlens.blame

Gutter Changes

Adds on-demand gutter changes annotations to highlight any local (unpublished) changes or lines changed by the most recent commit

Use the command to turn the annotations on or off

Press Esc to turn off the annotations

For more options, open Settings and search for gitlens.changes

Gutter Heatmap

Adds on-demand heatmap (age) indicator to the edge of the gutter to show how recently lines were changed

Use the command to turn the annotations on or off

Press Esc to turn off the annotations

Indicator color reflects the age of the most recent change (hot or cold), while indicator brightness ranges from bright (newer) to dim (older) based on the relative age

For more options, open Settings and search for gitlens.heatmap

Adds a user-friendly interactive rebase editor to easily configure an interactive rebase session

Dates & Times

Example date:
Example short date:
Example date:

For more options, open Settings and search for gitlens.default

Keyboard Shortcuts

Search for gitlens in the Keyboard Shortcuts editor to see the shortcuts and to customize them further

Modes

Supports user-defined modes for quickly toggling between sets of settings

Use the GitLens: Switch Mode command to quickly switch the active mode

Use the GitLens: Toggle Review Mode command to toggle Review mode

Use the GitLens: Toggle Zen Mode command to toggle Zen mode

For more options or to add your own custom modes, open Settings and search for gitlens.modes

#{endOfBody}