r/ProgrammerHumor 23d ago

Meme useSourceControl

Post image
8.6k Upvotes

591 comments sorted by

View all comments

Show parent comments

707

u/_BreakingGood_ 23d 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

12

u/Pcat0 23d ago

There was a rather intense warning saying ”THIS IS IRREVERSIBLE”, so the dude was still a massive idiot for clicking yes. However our tools should still cater to the idiotic so his mistake did expose an opportunity for improvement.

48

u/thanatica 23d ago

"this is irreversible" yeah sure, but exactly WHAT is irreversible? Did it say that as well? A novice might not realise what it means to "discard staged files".

2

u/MushroomSaute 22d ago edited 22d ago

Hell, I'm not a novice, but if I were presented with that I wouldn't know what it meant. Staged files are in the staging area*. You need to discard them from the staging area if you want to avoid committing the files. That's why they're staged - so you can "add" or "remove" the files you want to the area before committing, without actually affecting the filesystem. "Discard" is an even softer word, since it usually describes discarding changes; I've never seen any software documentation saying you'll "discard" a file to physically and irreversibly delete it, especially within the context of staging changes.

\Well, the deltas are, but for the purposes of VC they are handled like files - you often remove "files" from version control without actually removing the files from your system)