How to stop git from tracking all a folder(.vscode) and everything inside it.
Git is init in root say
RootFolder
which contain multiple projects say P1
, P2
and so on and each project folder has .vscode
folder.
I have tried this from RootFolder
git rm --cached -r .vscode/
But it says
fatal: pathspec '.vscode/' did not match any files
However it works from parent folders i.e. P1
, P2
, etc. And I have got hundreds of them.3 Replies
1. Add
.vscode
to your .gitignore
2. git rm -r --cached .
3. git add .
because there is no
.vscode
in the root
you could do what @ZZZZZZZZZZZZZZZZZZZZZZZZZ said, or alternatively git rm --cached */.vscode
@ZZZZZZZZZZZZZZZZZZZZZZZZZ @mg
Thank you very much.
@ZZZZZZZZZZZZZZZZZZZZZZZZZ method worked smoothly