Clearly, by the response to the "THIS WILL DELETE YOUR FILES" dialog, they did intend to lose that data.
The dialog didn't say it would delete files.
Even if it would delete files, the OS has a built-in feature to help users recover files which wasn't used, apparently because the creators of Git and/or VS Code were purely utter assholes who hate their users.
In this case, both. But seeing that the VS Code devs decided to fix this, they don't hate their users, they were just thoughtless. When it comes to the git devs, well…
In this case, the command-line UI is even safer.
git clean won't do anything without parameters. It requires
-f and with
-n it explicitly tells you it “Would remove” the files. But the Git UI does not matter, because it is hidden by VSCode.
And if you think about the recycle bin, you almost never want that.
git clean is normally used for removing build products and the recycle bin would be a huge mess if it put them in.