'Unable to force clean/remove file from vscode using git
I'm trying to use WSL2 to deploy my code, however I have this bunch of my files in my master branch that I simply cannot get rid of.
I've tried stashing and git cleaning them but to no avail. Can someone help me out?
Thanks!
This is what is shown in the terminal when I enter git status:

Please advice on how to remove them for good!
Solution 1:[1]
Are these untracked files in your local? If so, you can do the below.
- Review what is to be deleted. Don’t actually remove anything, but just preview.
git clean -n or git clean --dry-run
- Remove untracked directories along with untracked files. If an untracked directory is managed by a different Git repository, it is not removed.
git clean -fd
- You can then check if your files are removed with
git status.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | Arjun |

