431
submitted 9 hours ago* (last edited 9 hours ago) by Maven@lemmy.zip to c/programmer_humor@programming.dev
top 50 comments
sorted by: hot top controversial new old
[-] _____@lemm.ee 12 points 32 minutes ago

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

[-] JackbyDev@programming.dev 5 points 11 minutes ago

I fucking HATE when abstractions over git use cutesy names that git doesn't use.

[-] LANIK2000@lemmy.world 0 points 13 minutes ago

Honestly no idea why someone would go around a completely unknown menu in a new unknown editor and randomly click things with caution completely out the window. Not having a copy or trying a blank project, not even reading any messages. I mean even if we don't know it's a nuke button, God knows what other edits it could do to your code without you knowing.

This goes beyond rookie mistake. This is something 12 year old me would do. Same with the issue page being 90% swear words.

[-] JackbyDev@programming.dev 1 points 5 minutes ago

Honestly no idea why editors give shit random names instead of using the terms git uses.

[-] Korne127@lemmy.world 21 points 2 hours ago

Poor guy basically did a git reset —hard HEAD without even a git repository

[-] AnAmericanPotato@programming.dev 47 points 2 hours ago

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.

[-] Omega_Jimes@lemmy.ca 14 points 1 hour ago

I'm not great at English, but "discard all changes" shouldn't ever mean "Delete".

[-] Michal@programming.dev 5 points 47 minutes ago

In the context of version control it does. Discarding a change that creates a file means deleting the file.

[-] cocobean@bookwormstory.social 21 points 2 hours ago

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

[-] murtaza64@programming.dev 1 points 11 minutes ago

I wonder if there's already a git extension to automatically stash the working tree on every clean/reset/checkout operation...

[-] stetech@lemmy.world 1 points 33 minutes ago

Because “the underlying Git nukes them right away, so why shouldn’t we perma-delete the files, too?”

Anything else’d be effort…

[-] FreakinSteve@lemmy.world 6 points 1 hour ago

Jesus saves, and so should you

[-] Artyom@lemm.ee 9 points 2 hours ago

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.

[-] Korne127@lemmy.world 24 points 2 hours ago

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.

[-] ByteOnBikes@slrpnk.net 2 points 23 minutes ago

This person is why we have that meme where devs would rather struggle for a week than spend a few hours reading the documentation.

[-] Benaaasaaas@lemmy.world 3 points 1 hour ago

This is without gitignore, so probably just installed one js dependency

[-] LengAwaits@lemmy.world 27 points 4 hours ago

Looks like someone forgot about the 3-2-1 rule. Teachable moment.

load more comments (5 replies)
[-] parpol@programming.dev 2 points 1 hour ago

Maybe he would prefer perforce.

[-] aliser@lemmy.world 20 points 5 hours ago

deleted a chunk of my work the other day by pressing Ctrl z in windows explorer. my project was without source control installed (cuz it was in Dev stage), and Ctrl shit z/Ctrl y hotkeys didn't work, so that chunk was just gone, persished forever... or so I though. I remembered vs code having a file history under some panel. found it, and here it was - at least some of the latest history of my file. lesson learned: even in Dev where nothing is yet working, finish your day of coding with a commit to a remote repo.

[-] GreenKnight23@lemmy.world 10 points 3 hours ago

all I'm learning from these stories is to stay far far away from vscode.

[-] dragonfucker@lemmy.nz 2 points 1 hour ago

You can avoid this problem by not doing version control in your code editor. Different programs for different purposes. VS Code is fine for editing code and should not be used to manage an entire project.

[-] tiredofsametab@fedia.io 2 points 2 hours ago

I begrudgingly switched to vscode a few years ago. I've never had any issues like this with it. My only issues have been with a plugin that I installed optionally (and that was later fixed by the plugin author).

load more comments (1 replies)
load more comments
view more: next ›
this post was submitted on 20 Nov 2024
431 points (97.6% liked)

Programmer Humor

19623 readers
1255 users here now

Welcome to Programmer Humor!

This is a place where you can post jokes, memes, humor, etc. related to programming!

For sharing awful code theres also Programming Horror.

Rules

founded 1 year ago
MODERATORS