Support GitLens What's New 📣 Features About

GitLens is an open-source extension for Visual Studio Code, created by Eric Amodio.

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.

GitLens simply helps you better understand code. Quickly glimpse into whom, why, and when a line or code block was changed. Jump back through history to gain further insights as to how and why the code evolved. Effortlessly explore the history and evolution of a codebase.

Support GitLens

While GitLens is generously offered to everyone free of charge, if you find it useful, please consider supporting it.

Sponsors

marketplace installs rating slack

Support GitLens

Sponsors

While GitLens is generously offered to everyone free of charge, if you find it useful, please consider supporting it.

Also please write a review, star or fork me on GitHub, and follow me on Twitter.

I've been building GitLens in my “spare”1 time for well over 2 years now. From its very humble beginnings, GitLens has grown wildly beyond my expectations — in both its reach as well as its demands on my time and attention.

To my incredible backers — thank you so much for your contributions. I am truly humbled by your generosity and support.

What's new in GitLens 9

  • 9.1 DEC  2018
  • NEWAdds more detailed branch tracking status (if available) to the Branches list in the Repositories view

    * Commits Behind — quickly see and explore the specific commits behind the upstream (i.e. commits that haven't been pulled)

    * Commits Ahead — quickly see and explore the specific commits ahead of the upstream (i.e. commits that haven't been pushed)

  • NEWAdds the date and a changes indicator (+x ~x -x) to stashed changes in GitLens views
  • NEWAdds the changed file status (added, modified, renamed, deleted, etc) to the tooltip of each revision in the File History and Line History views
  • NEWAdds Git extended regular expression support to commit searches
  • NEWAdds control over the menu commands contributed to the Source Control side bar to the GitLens interactive settings editor
  • IMPROVEDChanges the Show Revision Details command to show file commit details
  • IMPROVEDChanges the alt-command of the Toggle File Blame Annotations command to be the Toggle File Heatmap Annotations command
  • IMPROVEDChanges searching for commits by message to be case-insensitive
  • FIXEDFixes an issue where gravatar icons would sometimes not show up — thanks to PR #579 by sgtwilko (@sgtwilko)
  • FIXEDFixes #33 — Commit messages can causes markdown formatting in hovers
  • FIXEDFixes #501 — Azure DevOps ssh remotes aren't handled properly
  • FIXEDFixes #523 — File History doesn't show all commits on file
  • FIXEDFixes #552 — "Open Line Changes with..." doesn't work for renamed files
  • FIXEDFixes #566 — History error with UNC
  • FIXEDFixes #572 — Explorer can't expand some branch folders
  • FIXEDFixes #584 — Unexpected results when opening diff from file history
  • FIXEDFixes #588 — Output channel doesn't exist with gitlens.outputLevel default
  • 9.0 DEC  2018
  • NEWAdds GitLens over Visual Studio Live Share

    Live Share guests will now have read-only access to GitLens' features, provided both the host and guest have GitLens installed

  • NEWAdds a new Git virtual file system provider for the gitlens: scheme — closes #430

    Replaces GitLens' internal handling of file revisions, which allows for better performance, as well as avoiding the use of temp files. It also provides a much better experience when dealing with file encodings, images, etc.

  • NEWAdds an Explore the Repository from Here command which opens a virtual workspace folder (using the new Git virtual file system provider) for the repository at the specified point in time (commit, branch, tag, etc) — closes #398
  • NEWAdds a new Repositories view, formerly the GitLens view, to visualize, navigate, and explore Git repositories — closes #456, #470, #494

    Provides a cleaner information-rich view of your opened repositories, more git commands (fetch, push, pull, checkout, stage, unstage, etc), better visibility and accessibility of existing features, and more

  • NEWAdds a new File History view, formerly the History view, to visualize, navigate, and explore the revision history of the current file

    Provides similar features to the former History view as well as quickly toggling file tracking on and off, changing the base (branch, tag, commit, etc) of the file's history, and more

  • NEWAdds an all-new Line History view to visualize, navigate, and explore the revision history of the selected lines of current file — closes #354

    Provides similar features to the File History view including quickly toggling line tracking on and off, changing the base (branch, tag, commit, etc) of the selected lines' history, and more

  • NEWAdds an all-new Search Commits view to search and explore commit histories by message, author, files, id, etc — closes #455

    Provides somewhat similar features to the former Results view as well as it is now a persistent view, makes it easier to start a commit search, and more

  • NEWAdds an all-new Compare view to visualize comparisons between branches, tags, commits, and more

    Provides somewhat similar and powerful features to the former Results view as well as it is now a persistent view, makes it easier to start a comparison, and more

  • NEWReduces the overhead of all GitLens views — GitLens now only tracks changes and updates the views if they are visible, collapsed or hidden views should have almost zero overhead
  • NEWAdds relative date markers (Less than a week ago, Over a week ago, Over a month ago, etc) to revision (commit) histories in GitLens views
  • NEWAdds branch and tag tip markers to revision (commit) histories in GitLens views — closes #560
  • NEWAdds a changes indicator (+x ~x -x) to commits in GitLens views — closes #493
  • NEWAdds comparisions to commit ids, by prefixing with a #, in addition to branches and tags — closes #535
  • NEWAdds support for git mailmap — closes #388
  • NEWAdds support for Azure DevOps (formerly VSTS) remotes — closes #501
  • NEWAdds better detection of on-prem BitBucket and GitLab remotes — closes #214
  • NEWAdds some missing gitmojis — thanks to PR #510 by Loris Bettazza (@Pustur)
  • NEWAdds a Directory Compare All Changes to open the configured git difftool to compare the working directory with HEAD — closes #569
  • IMPROVEDChanges the sorting of branch, tags, and files in GitLens views to be a natural sort #547
  • IMPROVEDChanges the Apply Changes command to truly apply only the patch of the specified change #539
  • FIXEDFixes #405 — Secondary, blank repository appears repeatedly in Repositories view
  • FIXEDFixes #430 — File revisions can end up being parsed by language servers (causing errors and warnings, etc)
  • FIXEDFixes #496 — Short hash length doesn't match git's default length
  • FIXEDFixes #503 — Open Changes (with difftool) opens one difftool window per changed file
  • FIXEDFixes #507 — Restrict commit message size
  • FIXEDFixes #527 — GitLens icon flashes on startup
  • FIXEDFixes #533 — Some descriptions not using markdown properly in Settings GUI
  • FIXEDFixes #544 — Some commit messages have one letter missing
  • 8.5 JULY  2018
  • NEWAdds an all-new GitLens sidebar view to contain the GitLens, GitLens File History, and GitLens Results explorers

    The new view is enabled by default, but can easily be configured back to the existing locations via the GitLens interactive settings editor

  • NEWAdds emoji support, e.g. :smile: in commit messages will now be 😃 — closes #429
  • NEWAdds Compare with Selected and Select for Compare commands to file nodes in the GitLens, GitLens File History, and GitLens Results explorers — closes #446
  • NEWAdds tag annotations to the tag tooltips in the GitLens explorer — closes #431
  • NEWAdds Choose from Branch or Tag History... command to the quick pick menu shown by the Show File History... command ( gitlens.showQuickFileHistory) — closes #316
  • NEWAdds the Compare File with Revision... command ( gitlens.diffWithRevision) as an alternate ( alt+click) for the Compare File with Previous Revision command in the editor toolbar
  • NEWAdds Checkout Commit (via Terminal) command ( gitlens.terminalCheckoutCommit) to commit node(s) of the GitLens explorer — closes #463
  • NEWAdds a gitlens.hovers.avatars setting to specify whether to show avatar images in hovers — closes #432 thanks to PR #441 by Segev Finer
  • NEWAdds gitlens.historyExplorer.avatars setting to specify whether to show avatar images instead of status icons in the GitLens File History explorer — allows for an independent value from the other explorers
  • NEWAdds the gitlens.hovers.avatars setting to the GitLens interactive settings editor to specify whether to show avatar images in hovers
  • NEWAdds Copy Remote File Url to Clipboard (gitlens.copyRemoteFileUrlToClipboard) command — copies the remote url of the current file and line to the clipboard — closes #467
  • IMPROVEDImproves performance of providing blame annotations, especially for large files (a ~33% improvement on some files)
  • IMPROVEDChanges commit search by sha to jump directly to the commit (if one is found), rather than having to click through to the commit
  • IMPROVEDRenames the GitLens History explorer to GitLens File History explorer for better clarity
  • IMPROVEDChanges the GitLens File History explorer to always show the full file history even when reviewing revisions
  • IMPROVEDChanges the behavior of and renames the Show Branches and Tags command and on the quick pick menu shown by the Compare File with Revision... command ( gitlens.diffWithRevision) to Choose from Branch or Tag History...
  • IMPROVEDChanges Rebase to Commit (via Terminal) command (gitlens.terminalRebaseCommit) to apply to all commit node(s) of the GitLens explorer
  • IMPROVEDChanges Reset to Commit (via Terminal) command (gitlens.terminalResetCommit) to apply to all commit node(s) of the GitLens explorer
  • IMPROVEDRemoves gitlens:activeIsTracked, gitlens:activeIsBlameable, gitlens:activeIsRevision, and gitlens:activeHasRemotes contexts and consolidates them into gitlens:activeFileStatus for better performance and UX
  • FIXEDFixes #436 — Copy to clipboard not working
  • FIXEDFixes #442 — GitLens File History fails if name (or path) starts with -
  • FIXEDFixes #440 — Searching for commits with an empty query yields to no results anymore
  • FIXEDFixes #444 — GitLens custom viewlet icon slightly larger than standard
  • FIXEDFixes #437 — Remove --first-parent from git commands to show file history from merged in
  • FIXEDFixes #252 — Cannot read property 'push' of undefined
  • FIXEDFixes #451 — "apply Changes" has discarded all my changes
  • FIXEDFixes #449 — Stop hiding explorers by default when in Zen mode
  • FIXEDFixes #454 — Search for string returns merge commits (unlike raw `git log -S`)
  • FIXEDFixes #462 — Source Control shortcut on macOS (⌃⇧G) shouldn't be overridden
  • FIXEDFixes #457 — Displays the wrong username (You) — thanks to PR #460 by Zyck
  • FIXEDFixes #459 — File blame annotation text overflow with letter spacing setting
  • FIXEDFixes #471 — Don't use Ctrl+Alt+[character] as a shortcut
  • FIXEDFixes #478suppressShowKeyBindingsNotice gets saved even when it is not required
  • FIXEDFixes #468 — Commit history for detached HEAD doesn't work properly
  • FIXEDFixes #477 — Can't load any GitLens features or UI
  • FIXEDFixes #482 — UI displays "undefined" in results panel when comparing
  • FIXEDFixes issues with GitLens Welcome and the interactive settings editor with light themes
  • FIXEDFixes issue where commands in the editor toolbar would flash unnecessarily when navigating history or switching tabs
  • FIXEDFixes issue where the Compare File with Previous Revision command wouldn't work properly when the file had been renamed in some cases
  • FIXEDFixes issue where the Compare File with Next Revision command wouldn't work properly when the file had been renamed in some cases
  • FIXEDFixes issue where changed files count was wrong when the branch was behind the upstream
  • FIXEDFixes issue where the GitLens File History explorer wasn't being updated automatically for working changes
  • FIXEDFixes issue where the Compare File with * Revision commands in the editor toolbar would show and hide too often because of insignificant focus changes
  • FIXEDFixes issue where the scope box would be empty when there was no workspace open in the interactive settings editor
  • FIXEDFixes issue where GitLens saves a couple settings with default values into user settings (rather than just removing the setting)
  • FIXEDFixes issue showing changes with untracked stashed files
  • FIXEDFixes issue showing changes with working file when the file has been renamed
  • 8.4 JUNE  2018
  • NEWAdds completely revamped heatmap annotations

    The indicator's color, now customizable, will either be hot or cold based on the age of the most recent change (cold after 90 days by default) — closes #419

    Cold Heatmap

    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

  • NEWAdds new branch history node under the Repository Status node in the GitLens explorer
  • NEWAdds GitLab and Visual Studio Team Services icons to the remote nodes in the GitLens explorer — thanks to PR #421 by Maxim Pekurin
  • NEWAdds gitlens.heatmap.ageThreshold setting to specify the age of the most recent change (in days) after which the gutter heatmap annotations will be cold rather than hot (i.e. will use gitlens.heatmap.coldColor instead of gitlens.heatmap.hotColor)
  • NEWAdds gitlens.heatmap.coldColor setting to specify the base color of the gutter heatmap annotations when the most recent change is older (cold) than the gitlens.heatmap.ageThreshold setting
  • NEWAdds gitlens.heatmap.hotColor setting to specify the base color of the gutter heatmap annotations when the most recent change is newer (hot) than the gitlens.heatmap.ageThreshold setting
  • FIXEDFixes #400 — GitLens logging to debug console when debugging different extension
  • FIXEDFixes #409 — Literal $(ellipsis) inserted into commit QuickPick menu entry placeholder text
  • FIXEDFixes #415 — Branch names get mangled by color escapes — thanks to PR #416 by Roy Ivy III
  • FIXEDFixes issue with insiders builds because of the new SymbolInformation API changes (see Microsoft/vscode#34968)
  • 8.3 MAY  2018
  • NEWAdds the ability to control where the GitLens, GitLens File History, and GitLens Results explorers are shown 🎉 — closes #213, #377
  • NEWAdds user-defined modes for quickly toggling between sets of settings
    Mode Switch
  • NEWAdds Switch Mode command ( gitlens.switchMode) to quickly switch the active GitLens mode
  • NEWAdds Toggle Zen Mode command ( gitlens.toggleZenMode) to toggle Zen mode which disables many visual features
  • NEWAdds Toggle Review Mode command ( gitlens.toggleReviewMode) to toggle Review mode which enables many visual features
  • NEWAdds modes settings ( gitlens.mode.*) to the interactive settings editor
    Mode Settings
  • NEWAdds an icon for the Compare File with Previous Revision command ( gitlens.diffWithPrevious) and moves it into the editor toolbar
  • NEWAdds an icon for the Compare File with Next Revision command ( gitlens.diffWithNext) and moves it into the editor toolbar
  • NEWAdds menu settings ( gitlens.menus.*) to the interactive settings editor
    Menu Settings
  • NEWAdds a display mode dropdown at the top of the interactive settings editor to reduce complexity
    Settings Mode
  • NEWAdds (re-adds) support for handling single files — closes #321
  • NEWAdds a tree layout option to tags in the GitLens explorer — closes #358
  • NEWAdds Show GitLens Explorer command ( gitlens.showGitExplorer) — shows/expands the GitLens explorer
  • NEWAdds Show File History Explorer command ( gitlens.showHistoryExplorer) — shows/expands the GitLens File History explorer
  • NEWAdds Show Results Explorer command ( gitlens.showResultsExplorer) — shows/expands the GitLens Results explorer
  • NEWAdds Close Repository command ( gitlens.explorers.closeRepository) to repository and repository status nodes in the GitLens explorer — closes (hides) the repository in the GitLens explorer
  • NEWAdds clipboard support for Linux without requiring any external dependencies — thanks to PR #394 by Cédric Malard
  • NEWAdds a select branch quick pick menu to the Open File in Remote command ( gitlens.openFileInRemote) when the current branch has no upstream tracking branch — closes #209
  • IMPROVEDShowing results in the GitLens Results explorer now properly shows the explorer first
  • IMPROVEDRenames Compare Line Revision with Previous command to Compare Commit with Previous for better consistency with other commands
  • IMPROVEDRenames Compare Line Revision with Working File command to Compare Commit with Working File for better consistency with other commands
  • IMPROVEDRenames Show Commit File Details command to Show Commit Details for better consistency with other commands
  • IMPROVEDReworks GitLens menu contributions and configuration — see menu settings above
  • IMPROVEDRenames the gitlens.advanced.menus setting to gitlens.menus
  • IMPROVEDUses the new Webview API for better interactions and behavior with the interactive settings editor and welcome page
  • IMPROVEDMoves the Open Working File command ( gitlens.openWorkingFile) to the right of the Compare File with * Revision commands in the editor toolbar
  • FIXEDFixes #366 — Running a GitLens command from a keybinding fails
  • FIXEDFixes #155 — Navigating file diffs with alt+, gets stuck
  • FIXEDFixes #359 — Show changes of an added file in the first commit
  • FIXEDFixes #372 — Wrong URL to VSTS work item when using hash work item id in commit
  • FIXEDFixes #362 — Too many code lenses in postcss files
  • FIXEDFixes #381 — Can't stash single files with older versions of Git
  • FIXEDFixes #384 — Absolute dates not always honored in GitLens Results explorer
  • FIXEDFixes #385 — Wrong git command to delete remote branch
  • FIXEDFixes #400 — Reset TO commit also resets chosen one
  • FIXEDFixes #399 — "Open x in Remote" commands aren't always available
  • FIXEDFixes #397 — Error while opening the gitlens view using Open View command
  • FIXEDFixes #391 — GitLens adds some settings in settings.json
  • FIXEDFixes #343 — Can't show blame when VSCode starts on branch without upstream — thanks to PR #390 by ryenus
  • FIXEDFixes #392 — unable to contribute if default script shell is sh — thanks to PR #393 by Cédric Malard
  • FIXEDFixes more instances of #295 and #318 — Any error encountered during the search for repositories could cause GitLens to die
  • FIXEDFixes issue with the chorded keyboard shortcut for the Compare File with Previous Revision command ( gitlens.diffWithPreviousInDiff) — from #395
  • FIXEDFixes bronze typo thanks to PR #361 by Cory Forsyth
  • FIXEDFixes individually typo thanks to PR #364 by Brett Cannon
  • FIXEDFixes issue where comparing previous revision during a merge/rebase conflict failed to show the correct contents
  • FIXEDFixes issue with the current line blame toggle not working when current line blame starts disabled
  • FIXEDFixes various issues when not on a branch
  • FIXEDFixes many issues where commands wouldn't work if the active file wasn't part of an open repository — now GitLens will try to find the best repository otherwise it will open a repository quick pick menu if there is more than one
  • FIXEDFixes the Open Working File command ( gitlens.openWorkingFile) not always showing in the editor toolbar when appropriate
  • 8.2 APRIL  2018
  • NEWAdds new stand-alone GitLens File History explorer to visualize the history of the current file — undocked version of the GitLens explorer history view
    GitLens File History explorer
  • NEWAdds richer tooltips to the GitLens and GitLens Results explorers, and richer working tree and upstream status to the GitLens explorer
    Richer tooltips and working tree and upstream status
  • NEWAdds an indicator to the GitLens explorer's branch history to mark the synchronization point between the local and remote branch (if available)
    Branch upstream indicator
  • NEWAdds ability to easily switch between relative and absolute dates via the gitlens.defaultDateStyle settings — closes #312
    General settings
  • NEWAdds annotation format settings ( gitlens.*.format) to the interactive settings editor
    Annotation format settings
  • NEWAdds new gitlens.currentLine.scrollable setting to specify whether the current line blame annotation can be scrolled into view when it is outside the viewport — closes #149, #290, #265
    Allow scrolling to annotation setting
  • NEWAdds gitlens.statusBar.reduceFlicker setting to the interactive settings editor
    Reduce status bar flashing setting
  • FIXEDFixes #314 — Toggle line annotation doesn't work properly
  • FIXEDFixes #310 — "via Terminal" commands need quoting around work directory
  • FIXEDFixes issues with the active repository in the GitLens explorer failed to update properly
  • FIXEDFixes issues with Open File, Open Revision, and Show File History commands and images and other binary files
  • FIXEDFixes issues preventing nodes in the GitLens explorer from expanding properly in certain cases
  • FIXEDFixes issues when refreshing nodes in the GitLens Results explorer
  • 8.1 MARCH  2018
  • NEWAdds automatic issue linking to Bitbucket, GitHub, GitLab, and Visual Studio Team Services for commit messages in hovers
    Issue linking in commit messages
  • NEWAdds support to toggle annotations for each file individually or for all files at once — closes #289
    Annotations toggle setting
  • NEWAdds icons to remotes in the GitLens explorer based on the remote service provider
  • NEWAdds multi-cursor support to current line annotations — closes #291
  • IMPROVEDRenames Compare Selected Ancestor with Working Tree command to Compare Ancestry with Working Tree and removes the need to select a branch first, since all compares are performed with the working tree — closes #279
  • FIXEDFixes #294 — Keyboard shortcuts will now default to chorded to avoid conflicts. Only affects new installs or if you remove the gitlens.keymapsetting
  • 8.0 FEBRUARY  2018
  • NEWBrand new welcome experience
    Welcome page
  • NEWBrand new interactive settings editor — GitLens is easier than ever to customize to suit your needs
    Interactive settings editor
  • NEWAdds a tree layout option to branches in the GitLens explorer — thanks to Yukai Huang!
  • IMPROVEDReworked settings — clearer, simpler settings
  • FIXEDPrevious settings will now be migrated properly — sorry everyone 😢

GitLens Features

GitLens simply helps you better understand code. Quickly glimpse into whom, why, and when a line or code block was changed. Jump back through history to gain further insights as to how and why the code evolved. Effortlessly explore the history and evolution of a codebase. Dive right in and see how GitLens can help!

While GitLens is powerful and feature rich, it is also highly customizable to meet your specific needs — find code lens intrusive or the current line blame annotation distracting — no problem, it is quick and easy to turn them off or change how they behave via the built-in settings editor , an interactive editor covering many of GitLens' powerful settings. While for more advanced customizations, refer to the GitLens settings docs and edit your user settings.

Here are just some of the features that GitLens provides,

  • an unobtrusive current line blame annotation at the end of the line with detailed blame information accessible via hovers
  • on-demand gutter blame annotations, including a heatmap, for the whole file
  • authorship code lens showing the most recent commit and # of authors to the top of files and/or on code blocks
  • on-demand gutter heatmap annotations to show how recently lines were changed, relative to all the other changes in the file and to now (hot vs. cold)
  • on-demand recent changes annotations to highlight lines changed by the most recent commit
  • a status bar blame annotation showing author and date for the current line
  • many rich Side Bar views
    • a Repositories view to visualize, navigate, and explore Git repositories
    • a File History view to visualize, navigate, and explore the revision history of the current file
    • a Line History view to visualize, navigate, and explore the revision history of the selected lines of current file
    • a Search Commits view to search and explore commit histories by message, author, files, id, etc
    • a Compare view to visualize comparisons between branches, tags, commits, and more
  • many powerful commands for exploring commits and histories, comparing and navigating revisions, stash access, repository status, etc
  • supports user-defined modes for quickly toggling between sets of settings
  • and so much more

About GitLens

GitLens started back in mid-2016, when I fell in love with Visual Studio Code and wanted to play with the newly released extension support. It was also a good excuse for me to improve my budding TypeScript skills. It all started with a simple question — could I add code lens showing Git insights to any document.

Since then, GitLens has quickly grown from a prototype to a full-fledged product with a mission of its own — make developers lives easier. GitLens strives to simply help you better understand code.

Read the reviews to see what people are saying about GitLens. I am truly humbled by the love and support of the Visual Studio Code community.

❤ My favorite review