140

I don't know what the correct name is for the issue I am having, or whether it is related to my VSCode, or some of its extensions.

Here is a screenshot depicting the problem:

enter image description here

Linux, VSCode 1.19.2

2

12 Answers 12

119
"gitlens.blame.line.enabled": false,// was working in previous versions
"gitlens.currentLine.enabled": false,// in modern version
"gitlens.codeLens.authors.enabled": false,
"gitlens.codeLens.recentChange.enabled": false,
8
  • 3
    it was "gitlens.codeLens.authors.enabled": true,. Thank you!
    – humkins
    Jan 23, 2018 at 15:09
  • 15
    The annoying authors and recent change lenses should be fscking disabled by default. Besides the almost always useless lenses in this case, it pops up an annoyingly huge frame whenever you hover over the lens which makes navigation a huge PITA! Feb 27, 2019 at 9:37
  • 2
    Now I use Gitlens' Zen Mode command to disable many visual features. The pain subsided. Feb 27, 2019 at 9:44
  • 7
    Where to add these lines ?
    – vikramvi
    Aug 7, 2019 at 6:42
  • 3
    @vikramvi add these line settings in "Preferences: Open Settings (JSON)" which you can access via the Command Pallette - Ctrl + Shift + P. (Cmd + Shift + P for Mac).
    – stwr667
    Jul 9, 2021 at 6:06
52

Answer for 2019

Ctrl+Shift+P => "Open Settings" Ctrl+F for "Show the authorship code lenses" Deselect the line.

enter image description here

3
  • Thanks, voting this up and any currently above answers down. Took me a while to find this one. Recent things are good things.
    – Jonny
    Apr 25, 2019 at 9:13
  • 1
    Agree @Jonny, SO needs better mechanisms for this Jun 25, 2019 at 20:55
  • 1
    now with update become Current Line Blame Aug 29, 2022 at 6:56
38

June 2023 review:

(GitLens v14.0.1, VSCode v1.79.0)

Ctrl+Shift+P -> GitLens: Open Settings. Then find "Current Line Blame" and "Git Code Lens" headers. Just deselect big checkboxes located at them:

enter image description here

enter image description here

16

One can now simply add "gitlens.mode.active": "zen" to settings.json with Gitlens version 9.5.1 to disable the annoying in-line features.

Tested with VScode 1.31.1 on Windows and Mac.

3
  • 1
    So ... how do you get the gitlens features back when you actually want to see them? I don't see that I can right-click a line and get the git data to display. Jul 16, 2019 at 0:13
  • 1
    At the bottom right of the VSCode window, there will be a button labeled "Zen". Here's a screenshot. You can click that and easily disable Gitlens' Zen mode. When you are done using Gitlens, you can click it again to go back into Zen mode. Jul 16, 2019 at 16:51
  • 1
    Nice! So, "Zen" turns to "Reviewing" after I click on "Zen". Then I click "Reviewing" to go back to zen mode. Jul 18, 2019 at 5:04
4

The name of the setting that you're looking for is called, Git Code Lens.

As mentioned in previous replies, there are several options available in the User or Workspace Settings Configuration. In more recent versions of VS Code, you can more easily access those settings from the menu.

  • On Windows/Linux - File > Preferences > Settings
  • On macOS - Code > Preferences > Settings

To update this setting for all projects, Navigate under User Settings > Extensions > GitLens. I chose to disable Git Code Lens entirely by deselecting the checkbox for Code Lens: Enabled; however, you may only want to disable certain features or only at the workspace level. I have included a screenshot including some of the settings below.

enter image description here

For additional information on User and Workspace Settings within VS Code: https://code.visualstudio.com/docs/getstarted/settings

3

As of version 8.5.6 you can turn it off with:

"gitlens.codeLens.enabled": false
3

As of 1st Jan, 2022:

Go to settings and search for "current line blame". Then uncheck the option that says Gitlens>Current Line>Enabled

1
  • Not enough, it will only disable it for current line. Feb 24 at 14:01
2

Answer for 2022

Ctrl + Shift + P and write Open Setting then Ctrl + F search for Current Line Blame turn it off.

1

2021 recent Visual Code. "Current Line Blame" is the one you should be looking for.

enter image description here

0

Windows 10 VSCode 1.63.2 2022 Git> Decorations: Enabled Solves the problem

Image of vscode settings

0

I think this is what most people want to achieve. Add these settings to the vscode user preferences:

{
  "gitlens.currentLine.enabled": false,
  "gitlens.codeLens.authors.enabled": false,
  "gitlens.codeLens.recentChange.enabled": false
}

Before:

enter image description here

After:

enter image description here

0

If you are not using GitLens and you are using GitHistoryDiff it has a setting, "Show git blame information for each line". Uncheck that option.

enter image description here

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.