0

I somehow managed to add every single file on my laptop to the version control bar in Microsoft visual studio. As a result there are tens of thousands of files in the version control bar, which has completely slowed down my laptop and caused it to turn off several times.

I tried discarding all the files in the version control bar. This hasn't worked for 2 reasons:

  1. There are far to many files.
  2. Some files yid errors meaning they can't be discarded from the version control bar. I have also tried uninstalling and reinstalling VS Code but that did nothing.
starball
  • 20,030
  • 7
  • 43
  • 238
DezF
  • 1
  • 1
  • Do you have a .gitignore? – Jesus Fung Jun 05 '23 at 21:51
  • @JesusFung This happened when I was trying to learn how to use version control so I'm not sure what a .gitignore is and I don't have one configured – DezF Jun 05 '23 at 21:59
  • ok. To understand more, what is the "version control bar" and what are you trying to accomplish (push files to repo, clone repository?) – Jesus Fung Jun 05 '23 at 22:06
  • @JesusFung: I added my home directory i.e. C:\Users\name to the source control bar in VScode. I want to clear it – DezF Jun 06 '23 at 13:55

1 Answers1

0

If this is a Git repository that you created, find the .git directory for the repo (directly under the root directory of the repository) and delete it (see also What is the .git folder?). On Unix, one efficient way is to use rm -rf (make absolutely sure you pass the right path). If you're on windows, see What's the fastest way to delete a large folder in Windows?.

starball
  • 20,030
  • 7
  • 43
  • 238