Beka Somkhishvili
Beka Somkhishvili

Reputation: 23

Visual Studio Code source control is full

I just started using GitHub and I think I messed up something in Visual Studio Code. As you can see on the Source Control screenshot it has 5000 changes and when I try to use Discard all changes or Unstage all changes functions, this error pops up:

Git: warning: failed to remove AppData/Local/Comms/UnistoreDB/USS.jtx: Invalid argument

This problem only occurs when I open one specific project, but never used any git commands on this project.

Upvotes: 1

Views: 4789

Answers (2)

Ambesh Tiwari
Ambesh Tiwari

Reputation: 756

navigate to your user, unhide the files in the disk and delete the.git folder.

Upvotes: 0

Marina Liu
Marina Liu

Reputation: 38136

It seems you located the git repo in the wrong directory. The root path for the git repo seems C:\Users\bekas\AppData\Local, while the project you want to version controlled by git seems in a subfolder of C:\Users\bekas\AppData\Local. To trouble shooting the issue, you can use below steps:

  • Check the root git repo path

    In terminal window, use the command git rev-parse --show-toplevel. The output path is where the git repo located. If you don’t need the directory to be version controlled by git, go to the directory and delete the .git folder.

  • Check the root of your project path

    Go to the root directory where your project located, and check if there has .git folder (managed by git repo). If not, use git init to manage this project by git repo.

Upvotes: 1

Related Questions