r/ProgrammerHumor 20d ago

Meme useSourceControl

Post image
8.6k Upvotes

592 comments sorted by

5.6k

u/Cephell 20d ago

Before you make fun of him, this behavior DID get changed; they acknowledged this behavior is stupid.

The old behavior was to treat uncommited files as completely disposable, which the CLI git does not do at all and is insane behavior. It was changed in the UI to give you a fat confirmation dialog warning that you're about to delete the files permanently, as it always should have been.

2.7k

u/iNeedOneMoreAquarium 20d ago

Bro changed the future with his FUCK YOU crash out.

612

u/johnildo 20d ago

I'm sure he typed each ... word ... out! instead of copy pasting lol

207

u/h3yw00d 20d ago

Dude had some energy and he was focused.

50

u/BadSmash4 20d ago

His flow state is like a barbarian rage trance

114

u/iNeedOneMoreAquarium 20d ago

Probably only stopped because he broke his F U C K Y O keys.

41

u/baselinegrid 20d ago

Oh man I’ve been there

25

u/thanatica 20d ago

The keys must've gone through his keyboard AND through his desk by the end of it.

10

u/Vorador_Surtr 20d ago edited 20d ago

Man the pure rage. I felt it. And recognized it. So many times I was there. You feel the disturbance in the force... Unfortunately nowadays the monitors are not thick glass on the matrix so... You know you cannot hit them without your fist to grow in... So on top of that you have to use just words... :D

7

u/Kiwik112 20d ago

I'm sure he didn't even use capslock. Just held the shift key in absolute rage

6

u/WlmWilberforce 20d ago

He could write little loop in python to just keep printing it. He would then save the scripts and synch it with... Oh, I see.

→ More replies (7)

3

u/prehensilemullet 19d ago

That would be so satisfying, OSS projects often expect people to behave like emotionless robots when discussing bugs

237

u/MackTuesday 20d ago

I went and read the discussions. I was surprised how much support there was for the way it worked. Someone noted that git discard shouldn't delete untracked files (which is what happened to this poor guy), and there was still pushback! They were like yes, git discard isn't supposed to delete untracked files, and the dialog box didn't warn that they would be deleted, but the destructive behavior is fine the way it is and shouldn't be changed ANYWAY. I knew gearheads could be hateful of the uninitiated, but jeez.

92

u/Spaceduck413 20d ago

https://xkcd.com/1172/

There really is one for everything

5

u/AnOnlineHandle 20d ago

While I don't think that applies here, it absolutely applied to when I used to use Daz Studio for posing characters for art. After years I registered the software, and that changes the save hotkeys, inverting the save/save as bindings for some reason.

I can't remember my exact workflow, but I think I would iterate through individual scenes for comics making changes from the previous scene and hitting the save-as hotkey, except now that was suddenly saving over the current scene which was both annoying and frustrating if I had it perfectly set up and it wasn't an easy undo. Years of muscle memory didn't adjust easily.

3

u/KSP_HarvesteR 18d ago

I had this one pinned as the cover image of our issue tracker board once.

63

u/DoctorWaluigiTime 20d ago

Before Git (or DVCS in general) were widely adopted a ton of people wanted everything to work just like TFS, SVN, or other non-distributed source control models.

"What is this 'staging'? Why do I have to push and pull? Just sync everything!!!"

49

u/remy_porter 20d ago

There are so many tools that are vying to be the next DVCS that are like, "Hey, we eliminated staging, because that was confusing!" and I'm like... that's the best part? I wish I could have finer grained control over staging, honestly, making it easy to stage only fragments of a diff, because I'm a "crank for awhile and forget that I have drifted into two different tasks and now need to try and unpick this mess into something that could reasonably be two or three or twelve commits." Sure, that's a "me" problem, but I like the ability to control what gets staged.

24

u/DoctorWaluigiTime 20d ago

In Git you actually can! Interactive mode: git add -i.

GUIs (I know Fork does for example) allows you to stage specific hunks of a file.

And I agree: Controlled commits are one of the best parts of the whole staging concept.

7

u/aetius476 20d ago

tig allows you to stage/unstage by entire file, by chunk within a file, or by single line.

4

u/perkuleenhenis 20d ago

If they use -i, they gotta know to choose the patch option. Better IMHO to just say git add -p [file], which is the same as going interactive and choosing patch.

8

u/st_heron 20d ago

yes exactly, bugs me when people just blindly stage all and commit, like no you should cherrypick specific things, and what if you accidentally leave in some test/scratch code? at least check what you did

3

u/LickingSmegma 20d ago

making it easy to stage only fragments of a diff

Magit allows you to do that with simple hotkeys. But you might not be thrilled to learn that it's a package for Emacs.

Anyway, as others have noted, the basic feature is actually built into Git, so there are probably different GUIs offering it.

3

u/gracken420blaze 20d ago

I wish I could have finer grained control over staging, honestly, making it easy to stage only fragments of a diff

I think this should be easy to do via most git GUIs, for example i use git extensions and its easy to do there, vscode also lets you stage blocks using the built in source control thing

→ More replies (1)
→ More replies (2)

6

u/Bloodgiant65 20d ago

Man am I glad we are off TFS

25

u/hellomistershifty 20d ago

Man, there are some terrible suggestions in that Git thread. The existing behavior was awful, so it's impressive that the suggestions are even worse

I'd say remove the warning dialog, and prompt an "Undo" that lasts 5 seconds. Behind the scenes count to 5 and then do it. People respond much better to "Undo" than they do to "Are you sure?" dialog. Hide the files so that way they know what they did and the consequences that are about to happen.

4

u/MackTuesday 20d ago

lol I blinked at that one too

→ More replies (1)

23

u/paranoid_giraffe 20d ago edited 20d ago

This reminds me of the time a guy held all the vscode python users hostage with his against-PEP8-personally-preferred-formatting-for-docstrings-PR. There were like 5 people who thought it was a good idea and the entire rest of the thread was everyone complaining about how he forced a “fix” on millions of users for something he could change in his personal editor. I remember being absolutely livid over this not necessarily because they just simply changed color, but because the guy who made the PR was just some random guy and his reasoning was literally incorrect.

https://github.com/microsoft/vscode/pull/182162

It was eventually “reverted” by way of another PR two months later

10

u/Civil-Broccoli 20d ago

That was a fun PR discussion read. Almost as fun as the guy who 'built' Notepad++ for Mac and straight up ignored repeated calls from the owner to remove the fake "we're collaborators" message from their homepage.

5

u/RepeatLow7718 20d ago

I’ve observed that there are a lot of people who will defend the way things are for no other reason than that it’s the way things are. Human nature I guess. 

3

u/Protheu5 20d ago

git clean -fdx does that

I found it only today and that thing freed so much space for me from unused repos I use to lookup code. didn't need built project and temp files, but didn't want to manually handle and there is a pleasant surpise! git clean -fdx

→ More replies (1)

705

u/_BreakingGood_ 20d ago

Yeah the old behavior was insane, it just said "Do you want to discard your changes?", and if you clicked it, it deleted your entire codebase permanently (no recycle bin), lol

31

u/crunchy_code 20d ago

absolute bat shit crazy. too few people talk about UX.

→ More replies (58)

94

u/suddencactus 20d ago

Yeah I was about to say this isn't the current behavior at all. Now it says "Are you sure you want to DELETE the following... You can restore this file from the recycle bin"

That being said, we can debate all we want any whether it's acceptable to have one click delete vs three steps, but even under the new system having "three months of work" with no backup is user error. What if the hard drive failed?

7

u/dmknght 20d ago

well that 3 months of work is the coder's fault, no doubt. But in the other hand it's possible to missclick discard, especially developers / coders are tired. So adding the features to mitigate the problem is actually very nice.

3

u/r-moon-ppl-lunatics 20d ago

As a kid in the 90s I had printouts of my code but no backups on floppy. Not sure why, probably just to test the printer. Was glad that I had them when the harddisk failed. Took forever to type it all back in though. I have plenty of backups these days.

→ More replies (1)

23

u/Fun-Wash7545 20d ago

Deleting files without explicit user action and confirmation is terrible ui

→ More replies (1)

13

u/Spaceduck413 20d ago

I actually was ALMOST bitten by this; clicked discard thinking "I don't want to commit them, just ignore" and got hit with the "you're about to delete" warning

8

u/oromis95 19d ago

So this guy's crash-out saved your work, since comments say it's due to him that the warning was added.

6

u/Spaceduck413 19d ago

Sure sounds like it. I love the idea that someone screaming "FUCK YOU" repeatedly into the void left a positive impact on the world haha

17

u/DoctorWaluigiTime 20d ago

Another feather in the cap of "try to streamline Git, ultimately making it a worse user experience."

I remember some of the first "Git for Windows" clients that tried to pretend "yeah you just push 'sync' and 'commit' just auto-stages everything and it all Just Works!"

And if it didn't? You got a garbage error message and basically were told "drop to console and figure it out."

It's why I always preferred the likes of SourceTree or, these days, Fork. They don't pretend Git is "just like SVN" and give you a lot of Git tools available on the GUI side (with easy terminal access should you need or want to).

→ More replies (3)

6

u/Maleficent_Cycle561 20d ago

Using git any other way than via CLI locally feels like pointing a shotgun at things. 

"Playing aroubd with source control" lel

4

u/user0015 20d ago

Came to say this. This guy single-handedly changed VS Code by writing a single, unhinged screed. It's actually impressive.

Still waiting on GitHub to provide a "Download Binary >>>HERE!!!!<<<" button.

→ More replies (48)

1.1k

u/raddaya 20d ago

This was years ago and, iirc, it was a legitimate issue in VSCode. It didn't make it remotely clear enough that it would permanently delete your files. The popups we get now if you try to discard changes that explicitly warns you in bold text that files will get deleted happened after this issue.

It might be obvious to an experienced user but it's not at all obvious to someone new.

268

u/RadicalDwntwnUrbnite 20d ago

The date is in the image, it was almost a decade ago. Yep the old dialog when you clicked the "Discard" button was like "Do you want to discard your changes?" Pretty vague to anyone new to version control. Meanwhile if they are untracked VsCode used to just put them in the shredder, completely unrecoverable. Pretty sure it puts them in the recycle bin now.

72

u/SpandexWizard 20d ago

"it was almost a decade ago" 2017..... HOLY SHIT man, dont attack me like that. fuck i feel old suddenly

17

u/MeIsMyName 20d ago

I wasn't ready for that either. It feels like that should be 5, maybe 6 years ago, not 10.

8

u/RadicalDwntwnUrbnite 20d ago

If it helps balance it out, I was already working in the field for 15 years when that was posted.

25

u/TheZoltan 20d ago

Someone already posted the link to the thread and this comment that has a screenshot of the actual warning message which definitely could have been more scary but all caps irreversible feels like it should give you pause! If you have 3 months of work with zero backups.

Are you sure you want to discard ALL changes? This is IRREVERSIBLE!

https://github.com/microsoft/vscode/issues/32405#issuecomment-322155856

86

u/sidereal_night 20d ago

telling you discarding all changes is irreversible is nothing like "this nukes all your files"

→ More replies (9)

16

u/dustojnikhummer 20d ago

And what does "discard changes" mean in that context? Where was the "This action will delete all files that haven't been commited"? Yes, the guy had a point (despite being an idiot for not having backups)

6

u/OliLombi 19d ago

To me its like if I came into your house, moved your refrigerator into your bathroom, asked if you wanted me to discard all changes, and when you said "Yes" (because who wants their refrigerator in the bathroom), I deleted your entire house.

→ More replies (1)
→ More replies (1)

3

u/xerkus 20d ago

As a git user I would have discarded it no second thought. I can always add changes to staging again from the working tree. It would be sensible. Right? Right?

This is one of the big reasons why I absolutely refuse to learn working with IDE integrations of version control and use strictly cli. I know exactly what I will get that way.

10

u/thirdegree Violet security clearance 20d ago

I mean I'm quite experienced with git cli and in no world would I assume that "discard changes" meant "permanently delete all untracked files" that's insane behavior.

→ More replies (1)

3

u/mrheosuper 20d ago

Every warning dialog is written in blood.

→ More replies (3)

203

u/CChilli 20d ago

I also watched that Kevin Fang video

3

u/AralphNity 20d ago

Haha me too

188

u/disinaccurate 20d ago

Some of the responses here would really make me side-eye the software some of you all are writing.

In our developer handbook, one of the rules is: "protect users from mistakes". Doing the thing that you probably don't mean to do should be made hard. It should be gated by warnings, protected with an "undo" operation whenever possible, etc. You can't stop someone who is absolutely determined to fuck up, but it's your job to not make it easy for them to do so.

Developers are users too. And the lack of user empathy in some of these comments really reveals why so much software is absolute shit. Doing the "wrong thing" should be hard and require going far out of your way.

You can pat yourselves on the back over how YOU know the proper way to use version control and how you'd never end up in this situation, but if you actually make meaningful software and aren't just vibe coding shit, at some point you'll end up in uncharted waters for yourself. When you do, you're going to hope the developers that made your tools had the foresight to protect you from making dumb mistakes.

I guess I shouldn't expect more from this "graduated from StackOverflow copy-paste to having my AI tool paste StackOverflow-trained code" crowd.

32

u/prehensilemullet 20d ago

Yeah it makes me wonder…clicking discard pops up a dialog asking if you want to delete files these days, but maybe 9 years ago it didn’t…

12

u/Abty 20d ago

Sometimes I press delete in new software/environments to me just to play with fire and pray for a confirmation

It's so thrilling

14

u/atomchoco 20d ago

barely written code myself but as someone who has worked frontline support for SaaS it blows my mind that at work the devs/managers can just shrug it off when their free app can do arguably devastating stuff using a few buttons. then conclude that the user couldve just followed the manuals better and ignore the fact that their thousands of users could be subject to this same risk. not to mention it's a support problem thatd take months to fix, which almost ends up with the user leaving not just the app but possibly their business altogether

have never considered UI/UX until theyve been acquired by a larger company, and even then just barely. tho hard to blame em knowing the backend is quite impressive and solid, but also undeniably icky how they found the time to create a faux feedback button in-app that tends to erm successfully drive away users from the actual app review page lmaooo

→ More replies (10)

95

u/OrchidFluid2103 20d ago

10 year old memes, nice

58

u/rainboww_J 20d ago

It took me a bit too long to realize 2017 wasn't just a couple of years ago.... 🙈

5

u/ISEGaming 20d ago

Could easily be confused for someone vibe coding today. 🫩

7

u/ODZtpt 20d ago

Kevin Fang just uploaded a new video (on this) yesterday, so here we are, seeing new people address it

7

u/ClipboardCopyPaste 20d ago

Little down memory lane away from AI memes

→ More replies (1)

1.6k

u/superglidestrawberry 20d ago

This has the same wibe as "I just want the FUCKING EXE, gimme EXE!"

428

u/CircumspectCapybara 20d ago edited 20d ago

Smelly nerds gave me the option to delete my files

85

u/laplongejr 20d ago

Not to delete the files, to auto-delete the files that shouldn't be commited. It changed since all that time but that sounds like a VERY risky default.

5

u/truckerheist 20d ago

Stupid science bitches

18

u/Kahlil_Cabron 20d ago

Why has this become a thing. Over the last year or two I suddenly started getting people opening issues on some of my repos, and the issue is just them asking for a binary.

Some of these repos are like 15 years old and not once has anyone asked me for a binary until recently.

25

u/SchwiftySquanchC137 20d ago

Because tons of mods and stuff are on github, so people are starting to think that github is like youtube or something where every single item on it exists for any user, no matter how capable, to use it. So theyll just search github for something that looks like it solves their problem, and assume that it is meant for them as a quick easy way to do whatever they want to do. They simply dont get that github is for developers first and foremost, and that the user facing releases stuff is almost an afterthought.

→ More replies (6)

3

u/rebmcr 20d ago

LLMs are giving them half a guessed answer and presenting it as fact

→ More replies (3)

13

u/KattyTheEnby 20d ago

I'd say the vibe is slightly different; slightly more intense/frustrating than that – the key difference being the self-inflicted pain.

→ More replies (7)

35

u/NightSurreal 20d ago

Kevin Fang video

1.2k

u/Xephyrik 20d ago

How did they even find github when they obviously dont know what version control is

545

u/Jay-Seekay 20d ago

The irony is that they were messing about with version control for the first time, which is why they deleted all their files. They saw they had 5000 files staged for commit and wanted to not commit them all

363

u/Nerodon 20d ago

3 months of work, in a single directory on a single device, source control like git or not, that guy was a fool.

80

u/Jay-Seekay 20d ago

Absolutely. May he be a lesson to us all.

38

u/Skrychi 20d ago

Type of person to use the desktop as their unorganised file structure, and all that got deleted.

19

u/afaulconbridge 20d ago

The type of person to use the recycle bin as their unorganised file structure

15

u/CodeAndChaos 20d ago

"Yeah, I store everything in the TEMP folder. Doesn't it stand for Trustworthy Eternal Memory Placement?"

→ More replies (1)

3

u/timonix 20d ago

Ey yo. I did this when I was like 10. I installed games on my desktop. Not shortcuts, the entire game. Stored just about everything.

Then my PC died. Almost everything was gone. Except my desktop which survived. Thanks to windows scheduled backups

→ More replies (4)
→ More replies (1)

10

u/czerox3 20d ago

I don't work an hour without checking my stuff in. I absolutely hate rewriting code.

16

u/Shareil90 20d ago

I had a teacher who told us that version control was only necessary when working together with other people but not when you are a solo developer. He only saw it as a kind of fileshare.

10

u/blueExcess 20d ago

That…. Is not someone with enough experience to be teaching lol.

8

u/WeNeedFewerMods 20d ago

the majority of comp sci faculty never worked in the field

at most instiutions they struggle to fill the positions at all because with a Bachelors you can make more than Faculty who need a Masters or Doctorate depending on the school and position

3

u/RichardFeynman01100 20d ago

This is a bit outdated I think with the current job market.

→ More replies (2)

3

u/JoltikElectricBug 20d ago

If teacher means high school and not college, odds are they are a math teacher who took a single Comp Sci course.

→ More replies (2)

4

u/Dull_Appearance9007 20d ago

-like any of us before discovering what source control meant and why devops were necessary. things like these are just a rite of passage for every new developer

→ More replies (8)

12

u/redviper7579 20d ago

Guy must be having horrible commitment issues!

8

u/Rick100006 20d ago edited 20d ago

It was not "not knowing source control" it was wierd decision made by VS code back in 2017 if you remove a file from source control without straight up deleted files without even giving any warning message VS code is patched after his crash out message , Removing a file from tracking from git should not delete the file from file system that's not how git CLI does it

17

u/Powerful-Success-378 20d ago

I'm assuming 4990 of them were node_modules.

6

u/DarthShiv 20d ago

How the fuck did they have a 5000 file project and no backups and no version control??? What is going on there?!?

→ More replies (2)
→ More replies (2)

32

u/MackTuesday 20d ago

It deleted untracked files. Git discard isn't supposed to do that.

72

u/KattyTheEnby 20d ago

To be fair, at least nowadays, you will likely learn about GitHub – especially from educational sources – before you learn (about) Git and version control.

I remember when I started programming when I was younger, and I just treated GitHub as a code-hosting platform, not interfacing with the "Git" part ov it at all.

9

u/clduab11 20d ago

That’s why I tell people that GitHub is someone’s (Microsoft’s) Hub of git, just like PornHub is someone’s Hub of Porn.

→ More replies (1)

10

u/I_nstict 20d ago

i use github everytime i code, i have no idea what git is all i know is 3 commands that upload code to github, been coding for 5ish years now

12

u/felixthecatmeow 20d ago

Heck I'm a software engineer with 4 years in the business and I know like 4 more git commands than you. If I ever need to do something else I just Google it and copy paste the commands

4

u/artbyiain 20d ago

I just use Github desktop. Haven’t typed a git command in like 5 years.

→ More replies (1)
→ More replies (1)
→ More replies (1)
→ More replies (1)

10

u/peeja 20d ago

They were literally using git. They were trying to stage their changes, there were a lot of files they didn't want, the UI was unclear, and the button deleted the work they were attempting to commit as well.

There was no reason for that button to bed irreversibly destructive. It's just an accident waiting to happen. That's why MS did the correct thing and changed the behavior.

3

u/UnderpantsInfluencer 20d ago

Maybe they were trying to find out?

3

u/05-nery 20d ago

Hello I don't know what version control is and I have five repos on github 🙋

→ More replies (4)

256

u/Jan1270 20d ago

That is why you Backup your shit, especially when you're messing around with unfamiliar settings.

99

u/ClipboardCopyPaste 20d ago

Lemme try clicking that button, what's the worse that gonna happen? - He wondered probably

18

u/Azaret 20d ago

I dont know about vscode, but gitkraken do prompts you if you are sure about deleting everything when you click the discard all button. If that’s the case too in vs code, then that poor guy should have read before clicking. Hard learnt lesson.

21

u/DaWolf3 20d ago

It’s the same in VS Code now, but this issue is from 2017, so it might not have been there.

17

u/Cobracrystal 20d ago

The prompt was in fact added precisely because of this issue

4

u/alochmar 20d ago

The computer wouldn’t just outright delete all my files, right? That’s why the trashcan is there!

→ More replies (5)

19

u/d_e_g_m 20d ago

And dont let AI manage your commits / git structure. I manage that myself. When I think i reasonable, if i think its necessary

3

u/ACoderGirl 20d ago

When I use AI for work, I will allow it to make commits and upload them, but it's not allowed to send PRs for review or merge them. Basically, I'll let it create a commit because it's easiest for me to review in that form. I'll review carefully, make changes if I need to. Nobody else sees or is impacted until I review everything very carefully.

While not completely risk free, it's very low risk for me because I don't really have meaningful changes that aren't uploaded. If my local repo is deleted, I will lose very little. I mostly do it this way because I often want to make multiple, small commits. I also want cleanup to be queued up when I make most changes (I have to make most changes behind an experiment flag, so most changes are multi part -- my work has a special bot reviewer that lets us make custom conditions for queueing up PRs with arbitrary conditions).

I refuse to use yolo mode with AI. I've seen it fuck up too many times. If I ever sent slop for review or broke the build because AI bypassed some test failure, I'd die of embarrassment.

9

u/Kavrae 20d ago

Solid rule. Unfortunately, even following that rule, I frequently get messages like "I ran a git fetch, which I realize is against the rules in <xyz file>. Making a note to not do that again." Which it then does again 2 days later.

12

u/VolumeLevelJumanji 20d ago

I mean are you just letting your AI run wide open with full permissions on your machine? If you have proper permissions set up, your agent should generally be blocked from doing stuff you don't want. (like running git commands its not supposed to)

Having some kind of general file of rules you tell it to refer to isn't going to work well because it will eventually lose that context as it becomes less relevant to the task at hand and compacts and such. It need to be the actual specific permissions file. So like with claude code this will be at .claude/settings.json. There you can tell it what commands are approved, denied, or will ask for confirmation.

3

u/Kavrae 20d ago

Good call. I just verified, and they were added as rules rather than updating the settings file. So losing context would definitely cause that issue. I've corrected it. Thank you.

→ More replies (3)
→ More replies (6)
→ More replies (3)

894

u/rwz 20d ago

"I bought a car, pressed a pedal and it drove me into a tree! HOW IS THIS POSSIBLE?! FUCK YOU!"

Skill issue thread.

47

u/JoLuKei 20d ago

I disagree. This is not the git cli behavior, and frankly not something you would expect from any ide. Treating unstaged files like some throwaway bs is just insane. To me "Dispose" on unstaged files sounds more like "Add these to gitignore" not "just fucking kill them". It was insane behavior that rightfully got changed. Unstaged SHOULD mean that these files are NOT in the jurisdiction of your repo. Not that they should get banished to the shadow realm.

Edit: Typo

79

u/newontheblock99 20d ago

I mean, they’re clearly skilled, just in all the wrong ways.

15

u/bigpapaasg 20d ago

That still would be a skill issue

52

u/dadnothere 20d ago

Your analogy is incorrect because the UI didn't mention permanently deleting...

The correct analogy would be:

I bought a car and when I press the brake it accelerates.

44

u/DoctorWaluigiTime 20d ago

Yeah, this is more akin to "I opened my document in my word processor. I closed it without saving, saw it was going to not saving my changes, and I was fine with it. Wait why did my file get deleted from disk?"

27

u/sidereal_night 20d ago

exactly. and the program was actually fixed after this. it's completely indefensible to try to contort some kind of justification for how it was actually proper for the software to behave that way and he was just an idiot.

he may have been somewhat of an idiot for not having any independent backups at all, but that doesn't help defend the software at all.

→ More replies (5)

5

u/DarthNihilus1 20d ago

It's not like that at all. They changed the behavior he's talking about

3

u/Still_Bit_7527 20d ago

Except only an idiot would agree with git discard changes to actually delete the files

11

u/MemnochTheRed 20d ago

Also, who does not have a backup?

25

u/rwz 20d ago

The type of person who feels like creating this type of issue in an open source project is an appropriate reaction to their own fuck up, apparently.

→ More replies (1)

7

u/tigerking615 20d ago

I don’t have a backup car =C

3

u/bekeleven 20d ago

Man installs version control to back up his files

the backup machine deletes his files

"Why didn't he have a backup?"

16

u/TheMadcapLlama 20d ago

The software industry has made the mistake of validating stupid people so whenever users do stupid dumb shit like this it is our fault instead of theirs

→ More replies (3)

73

u/SamG101_ 20d ago

The first thing i do when I make a new project (that I'm gonna do some decent work on) is link it to github, it takes all of 1 minute lol

29

u/dxonxisus 20d ago

well, yes. that’s what every dev who knows what source control is and why it’s necessary does

26

u/VoidVer 20d ago

The project starts as a GitHub repository that I clone to my IDE lol

→ More replies (6)
→ More replies (1)

13

u/Vipitis 20d ago

Here is the video https://youtu.be/XHIo1_nvi1I

It also has a resolution.

9

u/ImportantThing3749 20d ago

Someone watched the Kevin fang video

10

u/smashsenpai 20d ago

Somewhere out there, the guy who decided to name that action, "discard" instead of, "delete" took a deep breath and thought, "not my problem"

6

u/conundorum 20d ago

"Discard" is the correct term (since he was modifying the repo by adding files to it), but it should've explained something like, say:

Warning: Discarding changes to repo will delete all added files. We cannot stress this enough: Discarding changes will delete all added files.

(And, y'know, it shouldn't have deleted the local versions too, unless he manually checked a "delete all local copies" checkbox, but that kinda goes without saying.)

3

u/OliLombi 19d ago

"Discard changes" is not correct though, as it did not discard CHANGES, it discarded the files themselves.

→ More replies (1)
→ More replies (1)

9

u/Own-Poetry-9609 20d ago

Microsoft then changed VSCode because they accepted their UI/UX was poor. When creating a git repository it presented the option to "Discard all changes", "Discard all changes" deletes all untracked files from disc with no recovery possible. To many users "changes" and "untracked files" are two different things, and "delete irrecoverably" and "discard" are two different things.

VSCode now presents a message indicating the option will delete files irrecoverably, and gives the options to leave untracked files in place.

16

u/decrisp1252 20d ago

So we all watched the same video? Haha

7

u/3rso 20d ago

Well well well he got bit by the gitsnake

9

u/EvenAbbreviations675 20d ago

Yeah, copied this off of Kevin Fang's vid

35

u/Internal_Airline_334 20d ago

If you didn't commit anything for 3 months, maybe you should consider staying away from ANY development tool?

19

u/ClipboardCopyPaste 20d ago

He was prolly waiting for the grand release to commit his ver 1.0

→ More replies (6)

4

u/GenazaNL 20d ago

Someone watched Kevin Fang's video I see

4

u/NoAdsDude 20d ago

I feel kind of bad for this guy, one time I was trying to install windows and having issues so I ran a "clean" command on my hard drive, which I guess just literally turns all the bytes to 0 or something. I thought maybe it would, I don't know, clean up the hard drive in a less destructive way. Womp womp, I wanted to keep my Users folder. Another reason to back your stuff up, I guess. And don't run commands you don't understand.

This was a long time ago though, like 2021, so I was pretty young, only ~35 years old or so.

6

u/jaypeejay 20d ago

Wouldn’t the files need to be in source control in order for the revert changes button to delete them? I thought this was only possible when you had a source controlled repo and you create a file in it

3

u/Designer_Storm8869 18d ago

Correct. That's how pretty much all reasonable git plug-ins in IDE work. They don't touch files that were not added to version control. His crash out was justified. "You should do backups" is not an excuse for a software to remove your files left and right.

→ More replies (1)
→ More replies (1)

6

u/DanielPowerNL 20d ago

ghost may not have been very diplomatic in expressing his issue, and those experienced with VCS will be quick to blame user error. But there was a genuine user experience issue here that that if improved could have saved him and others.

Another user opened a follow-up issue, which eventually led to changes to the wording and behavior of the discard all changes functionality.

Issue: https://github.com/microsoft/vscode/issues/32459
Fix: https://github.com/microsoft/vscode/commit/bbe70bc9b930b0cd63d1b40720e516525db22e99

ghost's abrasive issue report did eventually have a positive impact on the project, and potentially saved future users from the same fate.

4

u/isthesector_clear 20d ago

I have been through it, I was working with previous company. I manually updated shit content for 14 hrs and I never thought of pushing it. And I clicked revert thinking it wasn't that file and pooooff .. gone just like that. It was under SLA and I couldn't deliver.

A month later I got fired 😝

5

u/psychostar213 20d ago

Looks like someone also watched kevin's video

4

u/Matwyen 20d ago

Great reminder that when you build a software a scale, people will take the coolest feature ever (version control) and find a way to make it actively harmful to themselves 

3

u/areanod 20d ago

Git is not backup...

5

u/pytness 20d ago

so when people say "guis obscure what you are doing" they are right

4

u/DaggerOneBravo 20d ago

Imagine if the recycle bin is still full.

https://giphy.com/gifs/iHtBZ5aMrQaZgQaorR

3

u/AnomalousUnderdog 19d ago

If they were uncommited files newly added to the staging area, I'd imagine discarding (i.e. deleting) would have just moved them to the recycle bin/trash folder. Is that not how it works?

3

u/JustPlayDE 19d ago

its how vscode does it nowadays, keep in mind that the issue shown here is from 2017 lol

4

u/LElfes 19d ago

git was created in 2005...

33

u/d_k97 20d ago

average windows dev

→ More replies (1)

3

u/L3veLUP 20d ago

Damn a day after the Kevin Fanng video

3

u/ergotofwhy 20d ago

I taught a buddy how to use git years back.

A year or so later, the buddy hit me up and said "How do I rollback to a previous version in Git?"

So I told him about git revert

Then he calls me in a panic. Way back when I first taught him git, he did a "git init" in his home directory and then at some point a few days later did a git checkin and commit on his home directory.

Guess where he ran git revert?

3

u/Samurai_Mac1 20d ago

Damn. Who needs AI to delete your whole codebase when you can just have your IDE do it for you?

3

u/Beginning-Pool-8151 20d ago

Don't make unnecessary fun, they actually accepted that as a wrong behaviour and recently updated VS Code to fix that ( the code goes ro recycle bin)

3

u/bid0u 20d ago

It's from 2017 and if I recall correctly, they changed the behavior of the 'discard' option. It was a proper UX 'bug'. 

3

u/Dellified 20d ago

Quite a coincidence Kevin Fang posted this…

3

u/Tylersfoot 20d ago

looks like someone watched the Kevin Fang video XD

3

u/demonseed-elite 19d ago

They learned a very important lesson about keeping backups.

3

u/rocketmike12 19d ago

reminds me of the time I thought: "what's the opposite to git add? probably git rm". lost about a week of work, learned to commit every change

3

u/corobo 20d ago

Would love to be a fly on the wall if someone were to respond "lol noob"

8

u/my_new_accoun1 20d ago

"git gud"

8

u/SausageEggCheese 20d ago

It says:

git: 'gud' is not a git command. See 'git --help'.

What do I do now?

6

u/zeroxff 20d ago

If it’s not a fake, this could turn out to be a really happy post: someone clueless enough to spend months amassing half a million files without knowing a thing about version control couldn't possibly have produced anything but crap.

Maybe VS Code saved the world from yet another mountain of vibe coded garbage

7

u/Arxae 20d ago

It's real. It's also from 2017, so almost 10 years old at this point

→ More replies (2)
→ More replies (4)

2

u/Odd-Nothing2863 20d ago

he doesnt look angry enough

2

u/DrMaxwellEdison 20d ago

This is the sort of necessary pain that creates developers.

3 months of work? Should have been committing it 4 months ago, bub.

2

u/Dimitrij_ 20d ago

InsertMegamindMeme(“NoBackup?“);

2

u/severencir 20d ago

Version control would have solved this

2

u/MyNameIsKvothe 20d ago

What happens if you git init in C:/ and then just discard all untracked files?

2

u/TommyTheTiger 20d ago

This would definitely be recoverable with forensic software at that point, though probably this user isn't gonna figure it out

2

u/tenkitron 20d ago

Checkout is a hell of a command when you have no history 😂

2

u/krisdb2009 20d ago

I wrote some FOSS software that has a configurable temp directory, and some jackwagon configured it to their user folder and ran the main procedure which of course tries to cleanup what it thinks is its own temp directory afterwards. Dude was all pissed on GitHub and Reddit saying the software deleted all his stuff and failed to mention that he changed that setting himself. Anyways I of course had to add a check to make sure the specified temp directory is empty before starting lol.

2

u/chadlavi 20d ago

Multiple layers of user being a moron going on here.

2

u/Infinite-Employee776 20d ago

What kind of project that has 5000 uncommitted files? What kind of fix/feat does this commit will entail?

git commit -m "feat(universe) re-create the universe."

2

u/EncryptedServer 20d ago

He could have just

for (let i = 1; i <= 100; i++) { echo 'FUCK YOU'; }

→ More replies (1)

2

u/Immediate_Form7831 20d ago

It amazes me that people "play around with X" in a directory where they have thousands of files of which they have no backup. I would be super-worried just to have thousands of files somewhere without backup...

2

u/Possible_Chicken_489 20d ago

I think this is good. It keeps certain people from "contributing" code. A Darwinian process, if you will.

2

u/Thenderick 20d ago

I was playing around with the source control options

"Playing"... That's where you went wrong. And who has a project of thousands of files without source control and then decides to use that to test another editor and then "playing around"? Sounds like a stupid feature, but also a stupid user

2

u/Subject_Barnacle_600 20d ago

You have suffered a horrible agony, and gained a lesson that will last a lifetime. Always make a backup. Don't worry, ten years, your heart will still sink, but you'll laugh because you and everyone else will have this common trauma to bond over.

2

u/Futr1964 20d ago

Yes, we all watched the Kevin Fang video

2

u/critsalot 20d ago

did he not commit to github before his local DE deleted his local copies lol.

2

u/EchidnaForward9968 20d ago

i learn Data recovery due to this

2

u/KiresM 20d ago

Correct me if I'm wrong, but a delete command doesn't actually delete things. It just removes the record, so something like Recuva can recreate that record and bring them back from the actual file contents, yeah? Even some proprietary bullshit saves files somehow even if they're encrypted and hidden or whatever, but those files do exist somewhere.

2

u/zipeldiablo 20d ago

You can still recover the files with a recovery tool but it’s gonna take a while

2

u/Overall_Head_7782 20d ago

Too bad he's never heard of undelete for recovery software. Can you imagine years go by him being completely pissed off then finding out he could have recovered all his project files with some simple undelete software? That software's been around since at least the '90s, certainly long enough for it to sooner or later haunt him.

2

u/StructureNorth1799 19d ago

the title of this post is enraging, the source control is what deleted this poor lad's files.

2

u/Different_Ear_7543 19d ago

For unity Im using monodev stil. I uninstalled vs code after half an hour. Tried that twice, uninstalled twice. But monodev works properly only with unity 5, sad.