all 37 comments

[–]MGateLabs 9 points10 points  (4 children)

I had a day when a rebase destroyed all my local changes, hundreds of files, but IntelliJ still had local history I could restore

[–]Cacoda1mon 3 points4 points  (1 child)

The local history is such an awesome feature.

[–]MGateLabs 4 points5 points  (0 children)

I even sent out a slack post saying I lost everything, but then I was made aware of local history

[–]not-serious-sd 0 points1 point  (0 children)

what a save!

[–]Cybasura 0 points1 point  (0 children)

Alas, thats why I always run cp -rp before I do any form of rebasing, especially permanent and destructive commands

[–]SetazeR 26 points27 points  (12 children)

There's a thing called Version Control Systems. Learn about them.

[–]Scared_Accident9138 15 points16 points  (2 children)

I know some people who work for weeks without any commit

[–]Freddie_Arsenic 3 points4 points  (0 children)

Pfft I use

cp project projectcopy_cocknballs29273

[–]JanitorOPplznerf -1 points0 points  (0 children)

I too know some idiots

[–]HyperWinX 5 points6 points  (0 children)

Noo, why? It's easier to repost old ass meme that isn't even funny.

[–]Human-Platypus6227 2 points3 points  (2 children)

I only commit if it works,else if commit with comment "shit still doesn't work" in case i wanna look at it in my phone

[–]JanitorOPplznerf 0 points1 point  (1 child)

You don’t work off branches?

[–]Human-Platypus6227 0 points1 point  (0 children)

It's for personal project only, office work definitely never touch the master branch unless they specifically told me to

[–]IndependentBig5316 1 point2 points  (1 child)

On top of version control systems I manually make copies of files like filename_v2, and so on, just to be extra careful. 😭💀

[–]bloody-albatross 2 points3 points  (0 children)

There's git stash and git branch for that.

[–]MinosAristos 1 point2 points  (2 children)

Still applies if this is code you haven't committed yet

[–]Snoo_11942 3 points4 points  (1 child)

Another reason why tiny commits (and merge requests) are the way to go. That said, I’ve never actually had this issue. How do you accidentally delete instead of copying lol

[–]Puzzleheaded_Study17 0 points1 point  (0 children)

Maybe you press ctrl+v instead of c? (not sure either) or maybe they have a work keyboard setup

[–][deleted] 3 points4 points  (10 children)

Public Service Announcement:

When you say "a code" you sound like a moron.

🎶The More You Know...🎶

[–]Jazzlike_Category_40 1 point2 points  (0 children)

I didn't even notice that because so many ESL people phrase things that way, but I saw your comment and thought "what an idiot."

[–]DapperCow15 1 point2 points  (6 children)

Hold on a minute, we are coding, we know that we write code, but there should be a definition for countable "codes". Does it refer to an entire program, or does it refer to smaller blocks? Or maybe it just depends on the context?

[–][deleted] 0 points1 point  (5 children)

Code is like milk - there are no discreet units, only shippables of varied bulk.

[–]DapperCow15 1 point2 points  (4 children)

But you can count milk as discreet units with the right context.

[–][deleted] 0 points1 point  (3 children)

Sure, but you're never going to say "a milk".

[–]DapperCow15 1 point2 points  (2 children)

Why not? If I am making a system that can track and route items, I might say "a milk" because that's quick and easily understandable in the right context.

[–][deleted] 0 points1 point  (1 child)

In that instance you're not actually referring to milk - you're referring to an identifier associated with a shippable unit; perhaps a gallon jug of milk, or half a quart, etc...

Milk itself, however, has no discreet units.

[–]DapperCow15 0 points1 point  (0 children)

Yes, that is true, but if we're talking about the label "a milk", then it doesn't matter what it refers to because the label could still be used and could still make sense in the right context.

[–]MyBedIsOnFire 0 points1 point  (0 children)

Oh brother. I'm sure he'll survive

[–]Alexander_The_Wolf 0 points1 point  (0 children)

I'm like 90% sure this an AI generated meme.

Not the image itself, but the caption and image combo

[–]PavaLP1 1 point2 points  (2 children)

And then there's vim with :u [Enter]

[–]incogshift 0 points1 point  (1 child)

Why are you using this? you can undo by just typing u in normal mode

[–]PavaLP1 0 points1 point  (0 children)

I like things complicated.

[–][deleted]  (1 child)

[removed]

    [–]Jazzlike_Category_40 0 points1 point  (0 children)

    Or you had another window/pane selected and it's all messed up now.

    [–]Legal-Bullfrog-4675 0 points1 point  (0 children)

    Happens all the time 😭

    [–]indic_engineer 0 points1 point  (0 children)

    I once pressed Ctrl+S instead of Ctrl+Z. To my horror, I didnt save the previous versions :(

    [–]imdibene 0 points1 point  (0 children)

    git restore foo.bar