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.

Sponsor 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

What's new in GitLens 10

  • 10.2.1
    FEBRUARY  2020
  • FIXED
    Fixes #932 — Absolute path used in compare on Git version 2.25
  • FIXED
    Fixes an issue with showing changes of staged files in File History view, Open Changes with Previous Revision command, etc.
  • FIXED
    Fixes certain error handling issues because of change in a VS Code error message
  • FIXED
    Fixes file history issues with copied/deleted files
  • 10.2.0
    NOVEMBER  2019
  • NEW
    Adds user-defined autolinks to external resources in commit messages — closes #897
    • Adds a gitlens.autolinks setting to configure the autolinks
    • For example to autolink Jira issues, e.g. JIRA-123 ⟶ https://jira.company.com/issue?query=123, use "gitlens.autolinks": [{ "prefix": "JIRA-", "url": "https://jira.company.com/issue?query=<num>" }]
  • NEW
    Adds a Highlight Changes command (gitlens.views.highlightChanges) to commits in GitLens views to highlight the changes lines in the current file
  • NEW
    Adds a Highlight Revision Changes command (gitlens.views.highlightRevisionChanges) to commits in GitLens views to highlight the changes lines in the revision
  • NEW
    Adds branch and tag sorting options to the interactive settings editor
  • IMPROVED
    Changes commit search to auto-detect full commit shas without the need to prefix it with commit: or #:
  • IMPROVED
    Changes paging in GitLens views to no longer be naive and now only loads the additional required data for much better performance
  • IMPROVED
    Changes the _Toggle File Layout_ command icon when in tree layout to match VS Code
  • IMPROVED
    Restores the original commit icon in the editor toolbar
  • FIXED
    Fixes #893 — Problems with # symbol in branch names — thanks to PR #894 by Allan Karlson (@bees4ever)
  • FIXED
    Fixes #677 — Line and file history not working in symlinked repository
  • FIXED
    Fixes #667 — Decoration rendered before code
  • FIXED
    Fixes issues where line blame annotations would sometimes stop working
  • FIXED
    Fixes compact view when branches are shown as a tree
  • 10.1.2
    NOVEMBER  2019
  • IMPROVED
    Changes commit icon to be closer to VS Code's
  • IMPROVED
    Changes webviews (welcome, settings) to have inline CSS to avoid FOUC (flash of unstyled content)
  • IMPROVED
    Only applies --ignore-revs-file custom blame flag if it is supported by the current Git version and the file exists
  • FIXED
    Fixes #882 — Search for changes command is malformed
  • FIXED
    Fixes #875 — Editing causes all contextual blames to disappear
  • FIXED
    Fixes #890 — Version warning "Don't Show Again" button not working
  • FIXED
    Fixes #889 — Make the heart icon (support GitLens) rounder
  • FIXED
    Fixes broken view layout buttons in the interactive settings editor
  • 10.1.1
    OCTOBER  2019
  • NEW
    Adds new options to sort tags by date, similar to branches via the gitlens.sortTagsBy setting
  • NEW
    Adds the tag reference and date to tags in the Repositories view
  • IMPROVED
    Bumps the required version of Git to be at least 2.7.2
  • FIXED
    Fixes #872 — OpenFileInRemoteCommand Cannot read property 'range' of null
  • FIXED
    Fixes #855 — Missing tags in Repositories view
  • FIXED
    Fixes an issue when creating tags with a message that contains spaces
  • FIXED
    Fixes an issue when creating and switching to a new branch
  • 10.1.0
    OCTOBER  2019
  • NEW
    Adds a new Git Commands
    • Adds a new branch command with sub-commands for create, rename, and delete
    • Adds a new tag command with sub-commands for create, and delete
  • NEW
    Adds better co-author support — closes #373
  • NEW
    Adds support for GitHub Pull Request uri schemes (pr://) — closes #678
  • NEW
    Adds new actions options to the status bar blame
    • Adds a gitlens.showCommitsInView option to show the commit in the Search Commits view
    • Adds a gitlens.revealCommitInView option to to reveal the commit in the Repositories view
  • NEW
    Adds a new Rename Branch... command to branches in the Repositories view
  • IMPROVED
    Improves (drastically) the performance of revealing commits in the Repositories view
  • IMPROVED
    Changes the Create Branch (via Terminal)... command to Create Branch... and uses the branch create Git command
  • IMPROVED
    Changes the Delete Branch (via Terminal)... command to Delete Branch... and uses the branch delete Git command
  • IMPROVED
    Changes the Create Tag (via Terminal)... command to Create Tag... and uses the tag create Git command
  • IMPROVED
    Changes the Delete Tag (via Terminal)... command to Delete Tag... and uses the tag delete Git command
  • FIXED
    Fixes #826 — Deleting stash doesn't remove the stash from the list - have to refresh
  • FIXED
    Fixes #769 — compacting causes duplicate names
  • FIXED
    Fixes issues with issue linking in hovers
  • FIXED
    Fixes issues with the Show commits in Search Commits view Git code lens action with uncommitted changes
  • FIXED
    Fixes missing prefix while search nodes are loading
  • 10.0.0
    SEPTEMBER  2019
  • NEW
    Adds 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!
  • NEW
    Adds an all-new Welcome experience with a simple quick setup of common GitLens features — accessible via the GitLens: Welcome command
  • NEW
    Adds a new and improved interactive Settings editor experience — accessible via the GitLens: Open Settings command
  • NEW
    Adds 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
  • NEW
    Adds 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
  • NEW
    Adds a Reveal Commit in Repositories View command to reveal the current commit in the Repositories view
  • NEW
    Adds a Show Commits within Selection in Search Commits View command to show all the commits within the current selection in the Search Commits view
  • NEW
    Adds 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
  • NEW
    Adds the Open Changes with Working File command to the inline toolbar for files in views
  • NEW
    Adds the Open Revision command to the editor toolbar and tabs context menu when a revision file is active in the diff editor
  • NEW
    Adds this Explore Repository from Revision command to the editor toolbar and tabs context menu when a revision file is active
  • NEW
    Adds a Prune command to remotes in the Repositories view to prune remote references — closes #556 thanks to PR #815 by Zach Boyle (@zaboyle)
  • NEW
    Adds ability to sort branches and tags in quick pick menus and views — closes #745
  • NEW
    Adds 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
  • NEW
    Adds ability to copy the selected item's details to the clipboard using the standard copy shortcut key when focused on a GitLens view
  • NEW
    Adds last commit date to branches in quick pick menus and views
  • NEW
    Adds 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)
  • IMPROVED
    Changes Stash All Changes commands in the Source Control view to toggle --keep-index appropriately — closes #698
  • IMPROVED
    Changes Ansible files to use document scope for code lens — thanks to PR #813 by Ahmadali Shafiee (@ahmadalli)
  • IMPROVED
    Changes fetch, pull, push, and stash commands to use their respective Git commands
  • IMPROVED
    Changes the Checkout command on branches, commits, and tags to use the switch Git command
  • IMPROVED
    Changes the Cherry Pick Commit (via Terminal) command to use the cherry-pick Git command
  • IMPROVED
    Changes the Merge Branch (via Terminal), and Squash Branch into Commit (via Terminal) commands to use the merge Git command
  • IMPROVED
    Changes 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
  • IMPROVED
    Changes the Reset to Commit (via Terminal) command to use the reset Git command
  • IMPROVED
    Changes the Revert Commit (via Terminal) command to use the revert Git command
  • IMPROVED
    Renames Checkout command to Switch for branches and tags for better clarity and to align with the new Git 2.23 commands
  • IMPROVED
    Renames Checkout command to Restore for commit/stash files for better clarity and to align with the new Git 2.23 commands
  • IMPROVED
    Renames Stashed Changes to Stashes or Stash depending on the context
  • IMPROVED
    Renames Copy \* to Clipboard commands to Copy \*
  • IMPROVED
    Renames Show Commit in View command to Show Commit in Search Commits View
  • IMPROVED
    Renames Show File History in View command to Show in File History View
  • IMPROVED
    Rearranges the ordering and groupings of the view item context menus
  • REMOVED
    Removes Show Commit Details from view item context menus
  • REMOVED
    Removes Show File History from view item context menus
  • FIXED
    Fixes #849 — Extra backslash in the hovers blame detail's link
  • FIXED
    Fixes #847 — Refresh button on Compare With Branch view is not working
  • FIXED
    Fixes #842 — List of changed files in comparison to working tree only shows changed files in comparison to HEAD
  • FIXED
    Fixes #828 — Version comparison to show welcome message is not future proof — thanks to PR #829 by Arunprasad Rajkumar (@arajkumar)
  • FIXED
    Fixes #821 — Wrong comparison order in the Compare view when using Compare [HEAD|Working Tree] With comands
  • FIXED
    Fixes #794 — Can't get back to settings page easily
  • FIXED
    Fixes #738 — Disable showWhatsNewAfterUpgrades notification
  • FIXED
    Fixes #723 (partially) — Top right tool loading/placement enhancement
  • FIXED
    Fixes issues with the Open Changes with Working File command when invoked from a stash
  • FIXED
    Fixes issue where the Open Line Changes with Previous Revision command would open the correct comparison in the diff editor
  • FIXED
    Fixes 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
  • FIXED
    Fixes an issue with branch sorting when the current branch was tree'd
  • FIXED
    Fixes 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
  • FIXED
    Fixes 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
  • 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

Sponsoring GitLens

Hi.

I'm an open-source enthusiast and maintainer . I ❤ open-source — both building and contributing. I love the collaboration and the sharing of knowledge driven by the open-source movement.

At the same time, open-source comes with a cost, of which gets paid by trading time and energy from other areas — for me it's usually sleep 💤, but sometimes also family. Of course, by sponsoring me and my work, you can't create time, but you can certainly help increase the reward aspect of trading this precious time and help ensure that it continues.

I spend a lot of my “free” time building and maintaining GitLens and have for well over 3 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. GitLens now has over 4 million installs (~34M downloads 😱) and is used by teams of all sizes, from single devs to enterprise teams. I also author and maintain many other VS Code extensions (and have ideas for many more) as well as contribute to many open-source projects.

💖 Thank you for your future sponsorship! And to my incredible sponsors — thank you so much for your contributions. I am truly humbled by your generosity and support.

Sponsored by

While GitLens is generously offered to everyone free of charge, if you find it useful, please consider supporting it. Also please consider starring it, writing a review, following me on Twitter and GitHub, or hiring me.

About GitLens

GitLens started back in mid-2016, when I fell in love with Visual Studio Code and wanted to play with the then 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 Git insights via code lens to any document.

Since then, GitLens has quickly grown from a simple prototype to a feature-rich product with millions of users and a mission of its own — 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