Visual Studio Code git/source control gutter stopped showing

Viewed 1862

Working with VS Code, the explorer git status gutter indicators stopped showing for one of my repositories.

  • I tried rebooting VS Code, My PC
  • I tried removing the index file and git reset

Those didn't resolve the issue.

(Git changes are still tracked in the Source Control Manager panel)

4 Answers

Solution for me has been to delete my folder (after saving/pushing it on the remote) and cloning the repo again.

It took me a long while to figure this one out. My changes were still being seen by VSCode and Gitlens, but they were not being tracked in the gutters... for SOME files. Uninstalling VSCode and re-installing would allow tracking for a bit, but even with all extensions off, it would eventually stop tracking in the gutter.

My solution:

I had renamed a few folders by changing the case. Git was not set to track case-sensitive, my Mac was viewing them as the same file, and VSCode was just being VSCode... Going back and renaming the files through Git ended up fixing the issue:

git mv navigation tmp
git mv tmp Navigation

successfully updated it. If it isn't working, I also had to updated git global (temporarily) and pushed with:

git config --global core.ignoreCase false

In my case, the gutter doesn't show if the folder path contains a ., like /home/user.focus/folder

Change the path to one without . works for me.

Related