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
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 "@builtin git".
Click the gear icon by Git, and click disable.
Then click it again, and click enable.
@builtin; here it showed two git extensions: "Git" and "Git Base" - disabling the first and reloading is what did it (and it is still disabled)Open your project with cmd.
> cd your-folder-location
> code . -n
It worked for me
code . didn't work and the -n new worked. Thanks!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:
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
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 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.
Possible duplicate
TL;DR : For mac CTRL + SHIFT + G worked
Ensure that you have saved your changes in the files you are working on. Visual Studio Code won't detect changes until the files are saved.
So just make sure that you have Auto Save enabled (File-> Auto Save)
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.
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.
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
I tried everything and the problem in my case was resolved as:
If a repository is already listed under Source control Repositories then click on it.
Now you can see initialize repository and publish to github option.
Type in the new repository name
Choose whether you want it as public repository or private repository
Now all your files will appear below source control.
Stage and commit all changes
Publish to github.
So i have checked
several answers and tried almost all of them but couldn't find any proper solution at the i disabled all the git extensions that i have and found the GitLens was the issues so if any one having the same issue while having gitlens in your vs code try disabling and restarting the vs code i am attaching image of version that i was using and i tried to update to pre release didn't fixed the issue so at the end i had to disable it.
I was facing the same problem, at first, I tried to save code and it started appearing in version control. to get rid of manual saving every time, you can toggle autosave from file>Auto Save.
This fixed it for me. Seems to be an issue with some cache getting corrupted probably.
This seems to re-create some folder-specific VSCode cache for the repo. I only have this problem when the specific repo-folder is named in a specific way.
I tried several solutions, such as restarting, uninstalling and reinstalling VSCode, and removing and reinstalling the extensions, but none of these worked for me.
The solution is to delete the cache for VSCode
Through the following path
On Windows: C:\Users\YourUserName\AppData\Roaming\Code
On Mac/Linux: ~/.config/Code
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 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).