What's New 📣 Features About Blog

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.

Sponsored by

marketplace downloads rating slack

Support GitLens

Sponsored by

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 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.7

  • 9.7.4 MAY  2019
  • NEWAdds a new experimental Incoming Activity node to each repository in the Repositories view (enabled via "gitlens.insiders": true) — closes #735

    Lists the recent incoming activity (merges and pulls) to your local repository. Provides the command, branch (if available), and date of each activity

  • FIXEDFixes issues with the Show More Actions button on the Details hover not working with renamed files
  • FIXEDFixes issues with the Open File, Open Files, Open All Changes with Working Tree, and Apply Changes commands in the views not working with renamed files
  • FIXEDFixes issues with the Open File, Open Files, and Apply Changes commands in the quick pick menus not working with renamed files
  • FIXEDFixes issues with the Show Stashed Changes (gitlens.showQuickStashList) command and multiple repositories
  • 9.7.3 MAY  2019
  • FIXEDFixes #740 — Opening untracked files from "files changed" section fails
  • FIXEDFixes issue where the Open Changes with Previous Revision command would compare the working file with HEAD even if there no working file changes (now it will compare HEAD with the previous commit)
  • FIXEDFixes issue where the Open Changes, Open Changes with Working File, and Open Revision commands on files in the "files changed" section of the Repositories view would either fail or do nothing
  • 9.7.2 MAY  2019
  • FIXEDFixes #737 — failed to fetch commits and branches
  • FIXEDFixes #743 — Update activity bar icon size — thanks to PR #744 by Miguel Solorio (@misolori)
  • 9.7.1 MAY  2019
  • FIXEDFixes #736 — git command error on GitLens 9.7.0 (unknown '-M' option)
  • 9.7 MAY  2019
  • NEWAdds support for Live Share presence
    Live Share presence

    Adds an avatar presence indicator and an invite button to start a Live Share session with the code author to the Details hover

    Adds presence status and an Invite to Live Share command to contributor nodes in the Repositories view

  • NEWAdds a new Views Side Bar Layout section to the interactive settings editor (via the GitLens: Open Settings command) with 3 layout presets

    Default — shows all the views together on the GitLens side bar

    Source Control — shows all the views together on the Source Control side bar

    Contextual — shows Repositories on the Source Control side bar, File and Line History on the Explorer side bar, and others on the GitLens side bar

  • NEWImproves the accuracy and experience of the following:

    Details hover

    Changes (diff) hover

    Open Changes with Previous Revision command

    Open Line Changes with Previous Revision command — closes #719

    Open Changes with Working File command

    Open Line Changes with Working File command

    Open Changes with Next Revision command

  • NEWAdds support to the Details and Changes (diff) hovers to differentiate between staged and unstaged changed
  • NEWAdds a Show All command to the Show More nodes in the views
  • NEWAdds Show More support (i.e. paging) to the File and Line History views
  • NEWAdds an improved experience when starting a new commit search or comparision
  • NEWAdds the renamed path to the description and tooltip of file nodes in the views
  • NEWAdds a gitlens.advanced.maxSearchItems setting to specify the maximum number of items to show in a search — closes #728
  • NEWAdds a gitlens.defaultDateSource setting to specify whether commit dates should use the authored or committed date — closes #537 thanks to PR #707 by Mathew King (@MathewKing)
  • NEWAdds a gitlens.advanced.similarityThreshold setting to specify the amount (percent) of similarity a deleted and added file pair must have to be considered a rename — closes #670 thanks to PR #714 by x13machine (@x13machine)
  • NEWAdds visual tracking to the table of contents of the interactive settings editor to make it easier to navigate and keep context
  • NEWAdds new documentation on how to use and customize GitLens' formatting settings: View Docs
  • NEWAdds an ${originalPath} token for use with file formatting which provides the full file path of the original file, if renamed
  • NEWAdds better logging to show current mode on startup and when changed — closes #725
  • IMPROVEDChanges path collapsing to also collapse root paths when using the compact file layout in the views
  • IMPROVEDEnsures file rename detection when getting the status of a repo or file
  • IMPROVEDRemoves searching for commits by changed occurrences (-S flag) as it is too confusing and searching by changes (-G flag) better matches user expectations — closes #730
  • FIXEDFixes #729 — "Show more results" in search commit show less results
  • FIXEDFixes #716 — Browsing history of a renamed file fails in forward direction
  • FIXEDFixes #724 — GitService.getBranches very very very long
  • FIXEDFixes #625 — Branches in Repositories view shows some commit comment texts as branches
  • FIXEDFixes issues with keyboard navigation (alt+, and alt+.) in commit details of the file history quick pick menu
  • FIXEDFixes issues with keyboard navigation (alt+, and alt+.) in commit details of the branch history quick pick menu
  • FIXEDFixes issues when showing all results in various lists and views
  • FIXEDFixes issue with id collisions between branches, remotes, and tags in the Repositories view
  • FIXEDFixes the Line History view when there are uncommitted and/or unsaved changes
  • FIXEDFixes various issues when trying to find the working file from a commit
  • FIXEDFixes issues where the Changes (diff) hover wouldn't work properly with renamed files
  • FIXEDFixes an intermittent issue where hovers fail to show

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