microsoft / microsoft/vscode

Explorer View does not refresh U "Untracked" files after adding them using git add -f

Open
#330,817 0 comments 0 reactions 1 assignee Claimed by @lszomoru View on GitHub
Dominant language
TypeScript
Stars
193k
Forks
42.4k
PR merge metrics
PR metrics pending

Description

Type: Bug

Have files untracked using .gitignore
file is green in Visual studio Code Explorer, and is marked with "U"

take away the file / folder from .gitignore
use git add (or git add -f) to add the file / folder to git.

Switch to Source control
Commit and sync with repository
Check that all files are pushed

Switch bach to Explorer
files marked with "U" are still green and marked with "U"

After restarting Visual Studio Code the markings disappear.

VS Code version: Code 1.133.0 (Universal) (a5b500951314efd502d07465bd138dfbd714a960, 2026-08-11T22:14:08Z)
OS version: Darwin arm64 25.6.0
Modes:

System Info

|Item|Value|
|---|---|
|CPUs|Apple M3 Max (14 x 2400)|
|GPU Status|2d_canvas: enabled
GPU0: VENDOR= 0x106b [Google Inc. (Apple)], DEVICE=0x0000 [ANGLE (Apple, ANGLE Metal Renderer: Apple M3 Max, Version 26.6.1 (Build 25G76))], DRIVER_VENDOR=Apple, DRIVER_VERSION=26.6.1 *ACTIVE*
Machine model name: Mac
Machine model version: 15.10
direct_rendering_display_compositor: disabled_off_ok
gpu_compositing: enabled
multiple_raster_threads: enabled_on
opengl: enabled_on
rasterization: enabled
raw_draw: disabled_off_ok
skia_graphite: enabled_on
trees_in_viz: disabled_off
video_decode: enabled
video_encode: enabled
webgl: enabled
webgpu: enabled
webnn: disabled_off|
|Load (avg)|2, 2, 2|
|Memory (System)|36.00GB (5.79GB free)|
|Process Argv||
|Screen Reader|no|
|VM|0%|
Extensions (42)

Name|Identifier|Author|Version
---|---|---|---
Project Manager|alefragnani.project-manager|alefragnani|13.1.0
Claude Code for VS Code|anthropic.claude-code|Anthropic|2.1.232
gitignore|codezombiech.gitignore|codezombiech|0.10.0
markdownlint|davidanson.vscode-markdownlint|DavidAnson|0.62.1
Docker DX|docker.docker|docker|0.18.0
learn-yaml|docsmsft.docs-yaml|docsmsft|1.0.6
Git Extension Pack|donjayamanne.git-extension-pack|donjayamanne|0.1.3
Git History|donjayamanne.githistory|donjayamanne|0.6.20
XML Tools|dotjoshjohnson.xml|DotJoshJohnson|2.5.1
GitLens — Git supercharged|eamodio.gitlens|eamodio|19.0.1
Rainbow CSV|mechatroner.rainbow-csv|mechatroner|3.24.1
Mermaid|mermaidchart.vscode-mermaid-chart|MermaidChart|2.7.5
Git Graph|mhutchie.git-graph|mhutchie|1.30.0
Arduino|moozzyk.arduino|moozzyk|0.0.4
URDF Visualizer|morningfrog.urdf-visualizer|morningfrog|5.2.0
Container Tools|ms-azuretools.vscode-containers|ms-azuretools|2.4.5
Docker|ms-azuretools.vscode-docker|ms-azuretools|2.0.0
Kubernetes|ms-kubernetes-tools.vscode-kubernetes-tools|ms-kubernetes-tools|1.4.1
Python Debugger|ms-python.debugpy|ms-python|2026.6.0
Python|ms-python.python|ms-python|2026.4.0
Pylance|ms-python.vscode-pylance|ms-python|2026.3.1
Python Environments|ms-python.vscode-python-envs|ms-python|1.36.0
Jupyter Notebook Renderers|ms-toolsai.jupyter-renderers|ms-toolsai|1.3.0
Dev Containers|ms-vscode-remote.remote-containers|ms-vscode-remote|0.466.0
CMake Tools|ms-vscode.cmake-tools|ms-vscode|1.23.52
C/C++ DevTools|ms-vscode.cpp-devtools|ms-vscode|0.5.14
C/C++|ms-vscode.cpptools|ms-vscode|1.32.2
C/C++ Extension Pack|ms-vscode.cpptools-extension-pack|ms-vscode|1.5.1
Makefile Tools|ms-vscode.makefile-tools|ms-vscode|0.12.17
PowerShell|ms-vscode.powershell|ms-vscode|2025.4.0
JUPITER|nhatvu148.jupiter|nhatvu148|1.7.0
Robotics Developer Environment|ranch-hand-robotics.rde-pack|Ranch-Hand-Robotics|1.0.0
Robot Developer Extensions for ROS 2|ranch-hand-robotics.rde-ros-2|Ranch-Hand-Robotics|1.2.1
Robot Developer Extensions for URDF|ranch-hand-robotics.urdf-editor|Ranch-Hand-Robotics|1.0.0
XML|redhat.vscode-xml|redhat|0.29.3
YAML|redhat.vscode-yaml|redhat|1.24.0
URDF|smilerobotics.urdf|smilerobotics|0.3.0
ShellCheck|timonwong.shellcheck|timonwong|0.39.5
vscode-pdf|tomoki1207.pdf|tomoki1207|1.2.2
Markdown All in One|yzhang.markdown-all-in-one|yzhang|3.6.3
json|zainchen.json|ZainChen|2.0.2
Open in GitHub, Bitbucket, Gitlab, VisualStudio.com !|ziyasal.vscode-open-in-github|ziyasal|1.3.6

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.