Visual Studio Code source control is full

情到浓时终转凉″ 提交于 2019-12-21 23:27:47

问题


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.


回答1:


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.




回答2:


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



来源:https://stackoverflow.com/questions/45675757/visual-studio-code-source-control-is-full

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!