I fucking HATE when abstractions over git use cutesy names that git doesn’t use.
Fuck around things you don’t understand, find out. Why even go near the source control area and start clicking stuff if you don’t know jack shit about it.
It seems like he was trying to learn though? He clicked it, like “hell yes I want source control, let’s figure this out”
“It says all my files are changed? Oh shit why did it change my files? Shit fuck, undo, how do I undo…Do I want to discard the changes? I don’t even know what it changed. Yes please undo whatever changes you did to my files”
And poof.
Who learns with five thousand files though?
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.
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.
If you have no idea what Git is, that warning message is not telling you you’re about to delete 5000 files.
But I wonder if this person maybe does know about Git because they used the word „stage“.
OK this is hilarious
When you sell hammers you’ll likely have people using them to hit their own heads, which, understandably, they will put the hammer at fault. Now, we already put a big don’t hit this on your own head label on our hammer. Should we actually prohibit people from head hitting with our hammers? Probably not, since some users still want to hit heads with it. It’s just how hammers work.
I disagree that that warning is reasonably clear. Even the comment that included it has the line of thought, where the user, not knowing what terms git uses thinks that they just did an action that is going to change each of their files. It makes sense that they’d want to discard those changes. That user then goes on with some snark about not wanting to learn any more about what they are playing with and that other programs would do the same, but “discard changes” seems like it would have a clear meaning to someone who doesn’t know git.
The warning says it isn’t undoable but also doesn’t clarify that the files themselves are the changes. Should probably have a special case for if someone hits discard changes on a brand new repository with no files ever checked in and hits discard on a large number of files instead of checking them in. Even a “(This deletes all of the local files!)” would make it clear enough to say what the warning is really about.
Even if you know git, you wouldn’t assume that “discard all changes” affects untracked files. It’s bad design all around
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 usedgit clean
in my entire career.-
He’s right, his shit doesn’t stink. His decision making was reasonable for a new programmer.
If you ever happen to have 5000 uncommitted files, you shouldn’t be asking yourself if you should commit more often. You should be asking yourself how many new repos you should be making.
This is without gitignore, so probably just installed one js dependency
The person didn’t have any git repository; probably a new programmer that didn’t know how version control works and just clicked discard without understanding what that means in this situation.
This person is why we have that meme where devs would rather struggle for a week than spend a few hours reading the documentation.
The real issue is already going 3 months without source control.
I have heard things from another apprentice who just does not use version control at all and the only copies are on his laptop and on his desktop. He is also using node.js with only 1 class and doesn’t know about OOP (not sure if you even use that in js no clue 😅) and has one big file with 20k lines of code I have absolutely no clue how he navigates through it
Reading this just give me a panic attack
I know the type. Usually the kind of confident know-it-all who refuses to learn anything but delivers changes really quickly so management loves them. I had the misfortune to fix such a project after that ‘rock-star’ programmer left the company. Unfortunately the lack of professional standards in our industry allows people like that to continuously fail upwards. When I left the project they rehired them and let them design the v2 of the project we just fixed.
When I left the project they rehired them and let them design the v2 of the project we just fixed.
Lol. Wow.
And that is why I’ve been unable to work myself out of a job in all my long years as a developer.
My company for the longest time had two engineers they would give all the new projects to. They would rush through some prototype code as fast as they could then management would bring in a new team to take the project over. The code was always garbage and crammed into one place. I kept getting new projects and instead of starting from a nice clean slate we always had to build on that garbage. It sucked so bad.
Jesus, reminds me of a similar story. My gf once lost a job to someone who literally just pasted code into LLMs, also delivering quickly, even tho it was hot garbage. Anyhow, she spent a lot of her time fixing his shit and so her output went down. I hope that company burns to the ground with completely un manageable software.
Those are rookie numbers. I have at least a 35k one somewhere. More than one actually.
People run their businesses on this.
I once landed a job at a small company doing a software for medical analysis labs all over the country. Software had been around for over ten years at this point. They had no source control. Nothing. Absolute nightmare.
They were literally starting to use source control when I arrived.
In 2015.
He just heard monoliths were in again
Ey! Reminds me of my middle-school years! I still can’t belive I made an entire game without a single class… Just storing info in arrays and writing in comments what location represents what data. But I was a literal child, too young to read guides or sit through “long” tutorials.
I don’t want to sound too mean, but whenever I see anything similar at work, I wish that person get a job they’re actually good at. It’s fine and all that the company started hiring actual programmers to fix things, but the fact that the old crew still fucks shit up with senior privileges is a major grievance.
The person didn’t have any git repository; probably a new programmer that didn’t know how version control works and just clicked discard without understanding what that means in this situation
Backups, backups, backups.
Like, damn son, at least make a daily archive of your project??
You have to expect things to go wrong, otherwise you have no one but yourself to blame.
I feel bad for this kid. That really is a bad warning dialog. Nowhere does it say it’s going to delete files. Anyone who thinks that’s good design needs a break.
Half the replies are basically “This should be obvious if your past five years of life experience is similar to mine, and if it isn’t then get fucked.” Just adding insult to injury.
I’m not great at English, but “discard all changes” shouldn’t ever mean “Delete”.
In the context of version control it does. Discarding a change that creates a file means deleting the file.
Ok fair enough, but I’m under the impression these files existed before the source control was implemented.
I guess it’s all up to how the program handles existing files.
Also, why not send them to the recycle bin? I never really thought about it before, but that does seem a reasonable UX improvement for this case
I wonder if there’s already a git extension to automatically stash the working tree on every clean/reset/checkout operation…
Because “the underlying Git nukes them right away, so why shouldn’t we perma-delete the files, too?”
Anything else’d be effort…
Typical web developer. He didn’t even know files can be deleted without going into „recycle bin”
Why are we dissing web developers? What is this bullshit elitism?
I think it’s a joke about how noobs only learn javascript and make blazing fast webapps while knowing nothing about computers.
Look at him. He’s just learned that files can be deleted without going info the recycle bin, and he already wants to be treated as equal. Ha!
please fix uwu
Someone who does not know about “permanent delete” and not having backups, especially when switching to a new system, should have no business complaining about this.
In reality, VSCode has local file history called “Timeline”. It’s enabled by default.
https://github.com/microsoft/vscode-docs/blob/vnext/release-notes/v1_66.md#local-history
In reality, that was added four and a half years after this issue was opened.
Oh, didn’t notice this was a 7 year old issue.
Understandable; no time to check details when your fuse is that short
Looks like someone forgot about the 3-2-1 rule. Teachable moment.
Go on…
3 backups: 2 different places/media on-site 1 off-site
What about 2 offsite and 1 onsite? That’s been my approach, mostly due to storage limitations onsite.
technically isn’t a vcs supposed to be one of those different places?
Yes, but the OP went 3 months without it and then messed up during setup
Often times, people learn that the stove is hot by touching it.
It’s easier to blame the stove than the person who touched it. But if you laugh when you watch it happen, you’re probably not laughing at the stove.
This is my take on this. People blaming the software but the truth is that no software can be trusted. Make backups. Make mistakes and learn. Sometimes it will be painful, but those are the most valuable lessons
let’s turn this into a constructive angle for future devs and current juniors: just learn git cli, I promise you it is much simpler than it seems.
all those memes about git having like a thousand commands are true, but you really will only use like 7 at most per month.
learn push, pull, merge, squash, stash, reset, im probably missing like one or two
I promise you again: it is much simpler than it seems. and you won’t have to use these stupid git GUI things, and it will save you a hassle because you will know what commands you are running and what they do
short disclaimer: using git GUI is totally fine but low-key you are missing out on so much
Checkout
Every time I mentor a dev on using git they insist so much on using some GUI. Even ones who are “proficient” take way longer to do any action than I can with cli. I had one dev who came from SVN land try and convince me that TortoiseGit was the only way to go
I died a little that day, and I never won her over to command line despite her coming to me kinda regularly to un-fuck her repository (still one of the best engineers I ever worked with and I honestly miss her… Just not her source control antics)
So I’m normally a command line fan and have used git there. But I’m also using sublimerge and honestly I find it fantastic for untangling a bunch of changes that need to be in several commits; being able to quickly scroll through all the changed files, expand & collapse the diffs, select files, hunks, and lines directly in the gui for staging, etc. I can’t see that being any faster / easier on the command line.
im probably missing like one or two
commit. Lol
Screenshots of git issues are one of my favorite genres of meme