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 10

  • 10.0.0 SEPTEMBER  2019
  • NEWAdds all-new iconography to better match VS Code's new visual style — thanks to John Letey (@johnletey) and Jon Beaumont-Pike (@jonbp for their help!
  • NEWAdds an all-new Welcome experience with a simple quick setup of common GitLens features — accessible via the GitLens: Welcome command
  • NEWAdds a new and improved interactive Settings editor experience — accessible via the GitLens: Open Settings command
  • NEWAdds a new and improved Git Commands experience
    • Adds a Keep Open toggle button to the quick pick menu toolbar
    • Adds a confirmation indicator / toggle button to the quick pick menu toolbar
    • Adds keyboard navigation
    • Adds a new search command to search for specific commits — see below for more details on the all-new commit search experience
    • Adds a new stash command with sub-commands for apply, drop, list, pop, and push
    • Adds a new reset command to reset current HEAD to a specified commit
    • Adds a new revert command to revert specific commits
    • Improves and enhances the fetch, pull, push, merge, rebase, cherry-pick, checkout (now called switch) commands
  • NEWAdds an all-new commit search experience, via the Git Commands or Search Commits commands
    • Adds the ability to match on more than one search pattern — closes #410
    • Adds case-[in]sensitive matching support
    • Adds support for regular expression matching
    • Adds the ability to match on all or any patterns when searching commit messages
    • Adds the ability to show results in the Search Commits view or within the quick pick menu via a toggle button in the quick pick menu toolbar
    • Adds a Reveal Commit in Repositories View button to the quick pick menu toolbar
    • Adds a Show Commit in Search Commits View button to the quick pick menu toolbar
    • Adds keyboard navigation
  • NEWAdds a Reveal Commit in Repositories View command to reveal the current commit in the Repositories view
  • NEWAdds a Show Commits within Selection in Search Commits View command to show all the commits within the current selection in the Search Commits view
  • NEWAdds new actions options to the Git Code Lens
    • Adds a gitlens.showCommitsInView option to the recent change code lens to show the recent commit in the Search Commits view
    • Adds a gitlens.showCommitsInView option to the authors code lens to show the commits within the range of the code lens block in the Search Commits view
    • Adds a gitlens.revealCommitInView option to the recent change code lens to reveal the recent commit in the Repositories view
    • Adds a gitlens.revealCommitInView option to the authors code lens to reveal the primary author's commit in the Repositories view
  • NEWAdds the Open Changes with Working File command to the inline toolbar for files in views
  • NEWAdds the Open Revision command to the editor toolbar and tabs context menu when a revision file is active in the diff editor
  • NEWAdds this Explore Repository from Revision command to the editor toolbar and tabs context menu when a revision file is active
  • NEWAdds a Prune command to remotes in the Repositories view to prune remote references — closes #556 thanks to PR #815 by Zach Boyle (@zaboyle)
  • NEWAdds ability to sort branches and tags in quick pick menus and views — closes #745
  • NEWAdds the Pull and/or Push command to current branch in the Repositories view if the current branch is not up to date with its upstream
  • NEWAdds ability to copy the selected item's details to the clipboard using the standard copy shortcut key when focused on a GitLens view
  • NEWAdds last commit date to branches in quick pick menus and views
  • NEWAdds support to use the GitHub avatar (if available) for authors with @users.noreply.github.com email addresses — partially addresses #281 — thanks to PR #814 by bolte-17 (@bolte-17)
  • IMPROVEDChanges Stash All Changes commands in the Source Control view to toggle --keep-index appropriately — closes #698
  • IMPROVEDChanges Ansible files to use document scope for code lens — thanks to PR #813 by Ahmadali Shafiee (@ahmadalli)
  • IMPROVEDChanges fetch, pull, push, and stash commands to use their respective Git commands
  • IMPROVEDChanges the Checkout command on branches, commits, and tags to use the switch Git command
  • IMPROVEDChanges the Cherry Pick Commit (via Terminal) command to use the cherry-pick Git command
  • IMPROVEDChanges the Merge Branch (via Terminal), and Squash Branch into Commit (via Terminal) commands to use the merge Git command
  • IMPROVEDChanges the Rebase (Interactive) Branch (via Terminal), Rebase (Interactive) Branch to Remote (via Terminal), and Rebase to Commit (via Terminal) commands to use the rebase Git command
  • IMPROVEDChanges the Reset to Commit (via Terminal) command to use the reset Git command
  • IMPROVEDChanges the Revert Commit (via Terminal) command to use the revert Git command
  • IMPROVEDRenames Checkout command to Switch for branches and tags for better clarity and to align with the new Git 2.23 commands
  • IMPROVEDRenames Checkout command to Restore for commit/stash files for better clarity and to align with the new Git 2.23 commands
  • IMPROVEDRenames Stashed Changes to Stashes or Stash depending on the context
  • IMPROVEDRenames Copy \* to Clipboard commands to Copy \*
  • IMPROVEDRenames Show Commit in View command to Show Commit in Search Commits View
  • IMPROVEDRenames Show File History in View command to Show in File History View
  • IMPROVEDRearranges the ordering and groupings of the view item context menus
  • REMOVEDRemoves Show Commit Details from view item context menus
  • REMOVEDRemoves Show File History from view item context menus
  • FIXEDFixes #849 — Extra backslash in the hovers blame detail's link
  • FIXEDFixes #847 — Refresh button on Compare With Branch view is not working
  • FIXEDFixes #842 — List of changed files in comparison to working tree only shows changed files in comparison to HEAD
  • FIXEDFixes #828 — Version comparison to show welcome message is not future proof — thanks to PR #829 by Arunprasad Rajkumar (@arajkumar)
  • FIXEDFixes #821 — Wrong comparison order in the Compare view when using Compare [HEAD|Working Tree] With comands
  • FIXEDFixes #794 — Can't get back to settings page easily
  • FIXEDFixes #738 — Disable showWhatsNewAfterUpgrades notification
  • FIXEDFixes #723 (partially) — Top right tool loading/placement enhancement
  • FIXEDFixes issues with the Open Changes with Working File command when invoked from a stash
  • FIXEDFixes issue where the Open Line Changes with Previous Revision command would open the correct comparison in the diff editor
  • FIXEDFixes some issues with the Open Changes with Previous Revision and Open Changes with Next Revision commands when in the right or left side of the diff editor
  • FIXEDFixes an issue with branch sorting when the current branch was tree'd
  • FIXEDFixes issues with the Explore Repository from Revision, Open Revision, Open Files, Open Revisions, Open All Changes, Open All Changes with Working Tree commands in the latest VS Code
  • FIXEDFixes typo of "workbench.colorCustomization" in README — thanks to PR #823 by Kwok (@mankwok)

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