Not sure about which comman they run. But SourceTree always gives a warning when discarding any change - new file or otherwise, which I think would also be a good addition to Wappler Git in general.
Have accidentally clicked on discard changes insted of show changes in context menu at least once. Thankfully, the changes were not too vast, so was able to redo it from memory.