Typical web developer. He didn’t even know files can be deleted without going into „recycle bin”
I’m sure that the “three months of work” was completely shit code. Anybody who is unfamiliar with source control (or even backups!) is prone to making stupid mistakes. Republican voters are likely to have a similar experience over the next 4 years.
Looks like windows should come with a dictionary.
“Huh, discard, I wonder what that does. Let’s try it on all my work from the last six months”
Idiots gonna idiot…
Problem is, there’s an entire generation of users that have gotten super used to “discard changes” as a means of signalling “on second thought, don’t do anything”.
From a certain point of view - isn’t this exactly what happened here?
I often go into a Git worktree of one of my projects and mess around a bit to try something out. If I find it’s not working, I tell git to discard the changes with git checkout .
and git clean -df
. What I’m saying is exactly “on second thought, don’t do anything" - while what happens in practice is that Git restores all files to their HEAD
status and removes all the new files that are not already in HEAD
.
Of course, the difference is that I already have all the work I want to keep under source control, so these changes I’ve discarded really were that - just changes. He, on the other hand, “was just playing with the source control option” - so these “changes” he was discarding really were all his work. But Git did not know that.
That’s definitely how it is seen.
If I were to see “Discard Changes” anywhere in a dialogue, I would assume it will discard whatever changes I made in that dialogue. In this case, probably some source control related changes.
If it were to say “Warning: This will Discard ALL changes!!!”, I might do a double take, but had I never used git
CLI before, I would still assume that at most it would discard “ALL” changes made in the current session.
For me personally, I would consider it more useful for it to say:
This action will delete the following files:
- followed
- by
- a
- list
- of
- files
- that
- would
- be
- deleted
Continue?
Which neither has to look like a warning, acting like you might be doing something you don’t want to and also is much more useful for someone like me who wants to double check what exactly I am deleting.
Also, I have used git
CLI before and apart from being able to see blame
in the editor itself and maybe a better representation of tree
, I don’t feel the need to use any git
GUI tool. Even when I tried, I realised it was slower and more finicky to use. So, it would stand to reason that it should be targetted towards people who don’t use CLI (and might have never used git
CLI).
This feels like when my brother backed up a file with Onedrive, then figured he could delete the original… the one that Onedrive was keeping track of.
It’s not that these aren’t confusing, but why risk your file without testing what the software will do first? Especially before hitting anything like “delete” or “discard”?
So VS Code isn’t just slow and bloated, it also deletes your files. So glad I was turned off by its excessive memory consumption and deleted it before it deleted my files.
Edit: also why I only ever used git from the command line, I never found a git UI that is easy to understand, and never trusted them.
You think VS Code is slow and bloated? What do you use?
Also, on several occasions I’ve had VS Code help me recover accidentally deleted files, because the editor keeps the file in memory, regardless of if it disappears on disk (like most editors).
What do you use?
Either an IDE like Visual Studio or Xcode or a text editor like Notepad++, Vim or nano, it depends. I also use Android Studio but I hate it.
VS Code slow and bloated? Someone hasn’t been spending nearly enough time in IntelliJ
Two things can be right at the same time. I remember when I used to run VS6, IE and WinAmp in 128MB with KBs to spare. Even today, proper VS is a much better product than VSCode while being a full fledged IDE and not just a glorified text editor.
Vscode is an ide
If vs6 is so great, feel free to use it
It’s also about productivity, Notepad uses less ram, but is not productive. This runs fine on any machine really
And the point of ram is to be used… You can’t check the ram usage and simply assume it’s bloated, because most apps also cache too. RAM is meant to be used
No it doesn’t delete your files. Hombre from the post told it to delete his files and was then shocked when it did. It even warns you that it’s about to delete your files. Then on top of that, post person wasn’t even using source control, so they can’t get their files back. Don’t mess with the source control options if you’re not using source control. Don’t just randomly click buttons without reading, if your project files are super critical. Don’t only have a single version of your entire project in a single place on one computer. This person obviously has no idea what they’re doing, which is fine, but they don’t belong anywhere near a 5000 file project.
should have at least had the decency to send them to the trash instead of outright deleting, this is just good and sane design
The reactions here are why people don’t join forums, don’t ask questions, or choose to learn alone. “duh, I knew that”. Yes, the dude didn’t, which is exactly why he’s frustrated. I think too many have forgotten what it’s like to be a beginner and make a fatal mistake, which would explain the mocking responses here and things like recommending new linux users Arch.
There is a difference between someone who is new and experiences something like their IDE deletes a file that was unexpected and asking a question about why it did that.
Then there are arrogant assholes who believe their shit doesn’t stink and that they couldn’t have done anything wrong and it was the IDE’s fault for not knowing what they wanted to do versus what they commanded it to do.
The OP is the latter.
I mean, not entirely, and he says he lost months worth of work. Like imagine you know nothing of git:
-
Click buttons in the IDE to add source control.
-
IDE says a bunch of files have been changed.
-
But I don’t want to make changes to the files, I want to source control them.
-
Attempt to undo the changes. Click “discard changes” thinking it will put them back to how they were before clicking add source control. Get a warning dialog that this is not undoable, but that’s fine because I don’t want whatever changes it made to my files anyway.
-
All files are deleted and unrecoverable.
Like that experience sucks balls and it’s reasonable that a person wouldn’t expect “discard” == “delete”. Also, from reading the GitHub thread, apparently at that time VSCode was doing a git clean
when you clicked this. Which like…yeah why the hell would it do that lol? I don’t think I have ever used git clean
in my entire career.
Months worth of work. Going an entire day without committing should never happen. Also, rawdogging it without a backup?
Nope, dude learned a hard lesson. No sympathy. He thought that the rules of data storage don’t apply to him and he got boned.
I understand the impulse to be empathetic and kind. But it’s very hard to respond in good faith to someone who just made a post where more than half the words are “fuck you”.
A feature that permanently deletes 5000 files with one click without warning deserves a fuck you.
It had a reasonably clear warning, though; a screenshot is included in this response from the devs. But note that the response also links to another issue where some bikeshedding on the warning occurred and the warning was ultimately improved.