I just started using VSCode and the git version control is showing all modified folders (on my desktop), not just those in my project. I would imagine this is a git root problem, but not sure how to fix it. Any suggestions?
Asked
Active
Viewed 1,958 times
0
-
1`git rev-parse --show-toplevel` check this one. – Adharsh M Jun 05 '19 at 15:47
-
Possible duplicate of [How to remove a git repository from a directory without deleting anything from it?](https://stackoverflow.com/questions/48864755/how-to-remove-a-git-repository-from-a-directory-without-deleting-anything-from-i) – phd Jun 05 '19 at 18:11
2 Answers
4
You need to check is there any other git is initialized in parent folders of your project. You can check this with git rev-parse --show-toplevel
. Check the path and remove the .git
folder from there.(If that is unwanted)

Adharsh M
- 2,773
- 2
- 20
- 33
0
One of the parent folders of your project is a git repo. You can find which one by running git rev-parse --show-toplevel
. You probably want to delete the .git
folder in the folder shown by this command. Before you do so, go to that directory and run git log
to check if there is any history that you need to keep.

Code-Apprentice
- 81,660
- 23
- 145
- 268