The clean all button in the changes header of the git tab does not behave as expected.
Pressing the clean all button (Designed to look like an undo button) removes all untracked files and folders as it calls git clean -fd We would expect it to clean only the files shown in the changes list. We think this was how it use to work with an older version of vscode.
Thanks.

The Clean All button cleans all changes in the Changes section. Untracked files and folders appear in the Changes section, so they are also cleaned up. It has always worked that way since the first release.
Yes but this doesn't seem to be taking into account the git ignored files and folders which in our case include the node_modules directories.
Ignored files and folders should not be cleaned since they don't appear in the list. Are you saying that in your machine they are being cleaned up?
Correct, it appears that the command being run is git clean -fd which is removing my git ignored files and folders. should it not be running git reset --hard which will reset all changes to tracked files ?
What is interesting is that we never call git clean -fd without any other arguments. Can you please open the Git Output view and show me the exact clean command Code is running?


Oh, I take it back, it doesn run git clean -fd. Sorry about that.
But what I find strange is that it doesn't happen to me. I always have a bunch of stuff inside node_modules which never gets erased. Git would only remove them if passing the -x option to the clean command, which we don't.
Did you maybe update git itself? What version of git do you have? Do you ignore node_modules in .gitignore?
Yeah it is ignored. my git version is 2.6.4. It does seem like this is now a git issue rather than a vscode issue i will investigate it further.
Thanks for the assistance.
Alright, let me know what you find, I'm curious in knowing.