visual-studio-codeversion-control

Turning off diff decorations for git staged changes in the SCM gutter


VS Code used to only show decorations for unstaged changed lines. Recently, I've noticed that instead of staged lines' decorations being removed, they are instead rendered as dark or transparent-looking (right image) compared to unstaged changes (left image).

Is there a setting to get the original behavior?

Unstaged changes Staged changes


Solution

  • Right click on the gutter (line number) and uncheck "Diff decorations" > "Git Local Changes (Index)":

    Screenshot showing which setting to disable

    The feature was added in version 1.100 (May 8 2025). From the Changelog:

    Quick diff decorations for staged changes

    To address a long-time feature request, this milestone we have added quick diff editor decorations for staged changes. Now you can view your staged changes directly from the editor, without needing to open the Source Control view.

    You can customize the color of the staged changes quick diff decorations by using the following theme tokens: editorGutter.addedSecondaryBackground, editorGutter.modifiedSecondaryBackground, editorGutter.deletedSecondaryBackground.

    If you do not want to see quick diff decorations for staged changes, you can hide them by using the Diff Decorations submenu that is available in the editor gutter context menu.

    I opened a feature request to allow configuration via settings(.json): https://github.com/microsoft/vscode/issues/249184