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 is an open-source extension for Visual Studio Code created by Eric Amodio.

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 GitLens Settings editor, an interactive editor covering many of GitLens' powerful settings. While for more advanced customizations, refer to the GitLens docs and edit your User Settings.

Configure GitLens

Don't miss how easy it is to configure GitLens!

What's New in GitLens 9.7

See the release notes for the full set of changes

  • 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