As the title says. I put the wrong value inside a clean up code and I wiped everything. I did not push any important work. I just want to cry but at least I can offer it to you.

Do not hesitate to push even if your project is in a broken state.

  • theherk@lemmy.world
    link
    fedilink
    arrow-up
    0
    ·
    1 day ago

    Some wisdom my dad shared with me decades ago: when you’ve lost everything and must rebuild, the rebuild is ALWAYS better. As a programmer for a very long time who has done what you did, I have found this to be true. So there is your silver lining.

  • ☂️-@lemmy.ml
    link
    fedilink
    arrow-up
    0
    ·
    2 days ago

    i sudo shutdown now the main production (remote) server a few times before, and ive been doing sshing into servers for a long time.

    there there 🫂 its ok. we all do this shit. you do have backups of course, right?

  • wheezy@lemmy.ml
    link
    fedilink
    arrow-up
    0
    ·
    edit-2
    2 days ago

    I did a “rm -rf *” in the wrong directory today.

    I got the absolutely beautiful “argument list too long” in return.

    I had a backup. But holy shit I’m glad the directory had thousands of files in it and nothing happened. First time I got that bash error and was happy.

    I usually have rm aliased to “trash” or whatever that cli based recycle bin is. But just installed a new OS and ran this on a NAS folder today by mistake.

  • Rolling Resistance@lemmy.world
    link
    fedilink
    arrow-up
    0
    ·
    3 days ago

    Sorry this happened.

    Use it as an opportunity to learn how to better store and edit your code (e.g. a VCS and a smart-ish editor). For me, a simple Ctrl-Z would be enough to get my code back.

  • Aganim@lemmy.world
    link
    fedilink
    arrow-up
    0
    ·
    3 days ago

    On the bright side, you’ve now got squeaky clean disk space to fill with new projects!

  • Mist101@lemmy.world
    link
    fedilink
    arrow-up
    0
    ·
    3 days ago

    I have a separate usb harddrive for just this occasion. My lazy ass just likes to play "We backed it up last time, do we need to do it every time?

  • Vince@lemmy.world
    link
    fedilink
    arrow-up
    0
    ·
    3 days ago

    Oh man, I hate losing code. Last time it happened I spent more time trying to recover it than it would’ve taken to rewrite it.

  • Valmond@lemmy.world
    link
    fedilink
    arrow-up
    0
    ·
    3 days ago

    Ya, push push push baby, do it on your own branch so that you can find your way back if needed.

    Especially when refactoring.