How to See Git Status in VS Code File Explorer
Visual Studio Code provides built-in integration with Git, allowing you to track the status of your files directly within the file explorer. This guide explains how to view, enable, and customize Git status indicators—such as color-coding and badges—directly in the VS Code Explorer tree to streamline your development workflow.
Built-In Git Status Indicators
By default, Visual Studio Code automatically visualizes the Git status of your files and folders in the Explorer side bar. Changes are indicated through two visual cues:
- Color-Coding: The color of the file name changes based on its Git status. For example, modified files typically appear in olive/yellow, untracked files in green, and ignored files in gray.
- Status Badges: A single-letter abbreviation appears
next to the file name.
- M indicates a Modified file.
- U indicates an Untracked file (new file not yet staged).
- A indicates an Added file (staged for commit).
- D indicates a Deleted file.
How to Enable or Configure Git Status in Explorer
If you do not see these visual indicators, or if you want to customize how they behave, you can adjust your VS Code settings:
- Open the Settings editor by pressing
Ctrl + ,(Windows/Linux) orCmd + ,(macOS). - In the search bar at the top, type Git Decorations.
- Ensure the following settings are configured to your preference:
- Git: Decorations Enabled
(
git.decorations.enabled): Check this box to enable color-coding and badges for Git status in the explorer. - Explorer: Decorations Badges
(
explorer.decorations.badges): Check this box to display the letter badges (like M, U, or A) next to files. - Explorer: Decorations Colors
(
explorer.decorations.colors): Check this box to enable color changes for modified, untracked, and ignored files.
- Git: Decorations Enabled
(
Troubleshooting Missing Git Status
If your files are not showing any Git status indicators in the Explorer tree, verify the following:
- Initialize Git: Ensure the folder you have open in
VS Code is an initialized Git repository. You can run
git statusin the integrated terminal to verify. - Git Installation: Ensure that Git is installed on
your local machine and that the path to the Git executable is correctly
configured in your VS Code settings under
git.path. - Repository Location: If your Git repository is in a
parent directory rather than the immediate workspace folder, ensure that
VS Code has permission to search parent directories by configuring the
git.repositoryScanMaxDepthsetting.