Visual Studio Code source control panel is empty when I click on it. Nothing to expand and nothing to click on.
Things I've tried:
- Uninstalled/Reinstalled Git
- Uninstall/Reinstalled VS Code
- Removed extensions folder
Visual Studio Code source control panel is empty when I click on it. Nothing to expand and nothing to click on.
Things I've tried:
Open your project with cmd.
> cd your-folder-location
> code . -n
It worked for me
Lost an hour because my SCM in VSCode stopped showing anything today. I restarted everything, tried git init, everything on the forums. Made sure Git built in extension is enabled, mine was already enabled so I was totally lost.
All I had to do was disable and then reenable the built in Git extension. and it fixed it.
Go to Extensions.
Filter by "built in".
Click the gear icon by Git, and click disable.
Then click it again, and click enable.
In my case, somehow, the Source Control Repositories
option, available under the 3 dots ...
on the SOURCE CONTROL
tab, was no longer selected.
All I had to do was press the ...
and select Source Control Repositories
, then select the correct repo, and all the changes were again listed.
I had a similar issue. It seems vs code has two source control extensions. When I clicked View -> SCM it opened an extension with changes displaying.
source control extension 1
source control extension 2
I had this problem 2-3 times for the last 2 years (OS -> Linux Mint). The changes on any file didn't appear to the source control nor have they been marked on the line I've edited. When manually go to "Source control" and click on the refresh button they appear but the lines that I had change didn't light up (there were no visual marking on the files after editing them). This happened when I switched to a different branch while the workspace was open to the 2 monitors at the same time. Or when working on several projects (opened 2-3 or more VS Code instances). The scariest thing was that it didn't work not only for one repository(project) but for all of them. I've read alot on the subject and tried everything that I found and think of. There is some issue with git path mapping or something.
The thing that I tried:
But the only solution that worked for me was:
What worked for me was going to my "code" folder where I keep all my repos, right-clicking on the folder containing the repo I want and opening that folder with VS Code.
The VS Code window for this specific repo was closed. I did have another window for a different repo open. As soon as the window opened, the changes showed up in source control and I was able to commit, push and everything else like normal.
I faced this problem when I opened a repo in a directory inside symlink.
My solution: just open this directory in original destination without any symlinks
I had the same problem. What I did was:
After this I saw that the source control started loading and my changes came back.
Hope this works for you.
I had this problem in a repository not as a problem from config but because I had a coverage folder with thousands of files not tracked and it seemed to slow the process of checking that out too much.
So I added that folder to .gitignore
and it started working again.
For me, the files were in WSL (Windows subsystem for linux) but I was not opening the folder as such.
in the bottom left, click the green >< symbol, then click "reopen folder in WSL"
presto.
I couldn't see any changes in while trying git status
. I opened changed files in text editor and they were not changed either. That lead me to conclusion that changes can't be seen by the system (and therefore by git).
The Autosave option was disabled, simply saving the changes helped.
That was my beginning with VSC, in Pycharm never had such problem.
I fixed this issue by toggled-on the AutoSave feature in VSCode via File > AutoSave. I noticed that the badge on the github does not show up until the file is actually saved first.
I had this problem, because I was changing files one folder down from where I opened Visual Studio Code.
Solution- open Visual Studio Code without a location, File/Open Folder - open the folder I am directly working out of.
Unstaged changes now show in the direct folder I'm working in. Unstage changes previously auto-staged by Visual Studio Code when working on a nested project directory to see them (open a Terminal and run git reset
).
I encountered the same issue, and I fixed that by removing the files.watcherExclude
property in settings.json
file.
Because the value of files.watcherExclude
became { "**/**/*": true }
somehow.
// settings.json
// remove or comment next line
// files.watcherExclude: { "**/**/*": true }
git status
and see if you have any errorsI had a unsafe repository fatat error, as my repo was on a network drive. Did as suggested by git to add an exception and it fixed the issue.
What worked for me was that I was forgetting to save, so just enabled autosave option.
File > Auto Save (check)
this solved my problem. this reset many of my settings but It can be checked from config backup.
I experience this problem when I right click a folder and open it up with VS code. Instead now I start VS code from the start menu and after that I use File -> Open Folder
option.
I experienced this issue with VSCode V1.70.1, all I did is just closing VSCode completely and open a new instance and I could find git changes appears simultaneously as expected.
If running into this issue on a Mac, make sure you are running your instance of Visual Studio Code from your Applications
folder and not your Downloads
folder. I managed to fire up an instance from the wrong folder and this prevented my Source Control from being able to properly load git info and also caused Visual Studio updates to fail. More on the issue can be found here.
Here is another possible solution for Linux users:
In my case, it was only not showing lines changed with the file open. Source control tab was showing fine.
I have a symlink from /var/www
to /mnt/{hdd-uuid}/www
. When I created my workspace, it was using the path /var/www/project-folder
, instead of the full path, and this was giving me the error.
I opened my .code-workpsace
file in another text editor and changed the references in the JSON from ../../../../var/www/project-folder
to /mnt/{hdd-uuid}/www/project-folder
, then reopen VS Code. Close all file tabs open and, when you open again a modified file it will show the lines changed.
It is possible that you need to trust the repo again.
This worked for me:
I don't know how this got disabled in the first place.
All the answer dosn't work for me.
My status is VSC show the count of change, but dosn't show the file changed.Finish I find the my self answer.
1.make some change;
2.click the source control commit buttom and commit;
3.undo commit in the commit block;
4.the file changed will show
In my case, all my files is in 'WSL' home directory and I'm using 'Ubuntu' distro to run my application. I was using 'Visual Studio Code' in windows as my IDE. Later I installed 'VS Code' in wsl and put a bat file in windows Desktop to run it with a single click. The bat file contain following line only.
wsl code
Try opening project or folder which contains git files. Later try opening your wanted folder. This sorted the issue for me.
Double-check git is actually installed on your system. I just did a fresh install of Windows 11 the other day, and although one of the development tools I installed thereafter downloaded and supposedly installed git in Windows, actually, it never installed it. Fail!
I know this is hardcore but it's the only way I got rid of the problem in Ubuntu 22.04:
rm -rf ~/.config/Code
Then re-open it.