Beehaw
  • Communities
  • Create Post
  • search
    Search
  • Login
  • Sign Up
cm0002 ( cm0002@lemdro.id )  to Programmer Humor@programming.devEnglish · 1 year ago

When you screw up git

lemmy.zip

message-square
33
link
fedilink
458

When you screw up git

lemmy.zip

cm0002 ( cm0002@lemdro.id )  to Programmer Humor@programming.devEnglish · 1 year ago
message-square
33
link
fedilink
alert-triangle
You must log in or # to comment.
  • Cevilia (they/she/…) ( Cevilia@lemmy.blahaj.zone ) 
    link
    fedilink
    English
    arrow-up
    70
    ·
    edit-2
    5 months ago

    deleted by creator

    • √𝛂𝛋𝛆 ( j4k3@piefed.world ) 
      link
      fedilink
      English
      arrow-up
      48
      ·
      1 year ago

      It is a duplicated repeating error because this clownshow of a website is managed by squirrels and ducks. 1-800-273-8255 would be a valid US number. Doubling 273-8255 is not, but probably vibe coded under management that should be purged by these results.

    • Catoblepas ( Catoblepas@piefed.blahaj.zone ) 
      link
      fedilink
      English
      arrow-up
      34
      ·
      1 year ago

      Well, that’s easy to remember! 0118, 999, 881, 999, 119, 725…3.

      • fedditter ( fedditter@feddit.org ) 
        link
        fedilink
        arrow-up
        15
        ·
        1 year ago

        Did you see that ludicrious display last night??

        • OpenStars ( OpenStars@piefed.social ) 
          link
          fedilink
          English
          arrow-up
          10
          ·
          1 year ago

          Yes I did. Just put it over there with the rest of the fire.

    • guillem ( guillem@aussie.zone ) 
      link
      fedilink
      arrow-up
      9
      ·
      1 year ago

      deleted by creator

  • jaschop ( jaschop@awful.systems ) 
    link
    fedilink
    arrow-up
    21
    ·
    1 year ago

    It’s never too late to git merge --abort!

    • TheFriendlyDickhead ( TheFriendlyDickhead@feddit.org ) 
      link
      fedilink
      arrow-up
      19
      ·
      1 year ago

      But abortion is murder?!?!?!?!?

  • katy ✨ ( cupcakezealot@piefed.blahaj.zone ) 
    link
    fedilink
    English
    arrow-up
    15
    ·
    1 year ago
    git reset --hard <commit-hash>  
    git push -f origin main  
    

    i didn’t see anything, officer

    • martinb ( martinb@lemmy.sdf.org ) 
      link
      fedilink
      arrow-up
      10
      ·
      1 year ago

      You should be forcibly kept away from production systems…

      • henfredemars ( henfredemars@infosec.pub ) 
        link
        fedilink
        English
        arrow-up
        8
        ·
        1 year ago

        We had an intern do this once. We changed our server config to make sure it wouldn’t accept such operations.

      • unalivejoy ( joyjoy@lemmy.zip ) 
        link
        fedilink
        arrow-up
        1
        ·
        1 year ago

        Never use --force. Always use --force-with-lease.

        • enbiousenvy ( enbiousenvy@lemmy.blahaj.zone ) 
          link
          fedilink
          English
          arrow-up
          2
          ·
          1 year ago

          I’ve mistyped that a couple of times to be --force-with-leash

          • unalivejoy ( joyjoy@lemmy.zip ) 
            link
            fedilink
            arrow-up
            4
            ·
            1 year ago

            git push origin master --force-with-leash

            Don’t do that to your master.

          • katy ✨ ( cupcakezealot@piefed.blahaj.zone ) 
            link
            fedilink
            English
            arrow-up
            2
            ·
            1 year ago

            only do that in puppygit (with consent)

            • enbiousenvy ( enbiousenvy@lemmy.blahaj.zone ) 
              link
              fedilink
              English
              arrow-up
              1
              ·
              1 year ago

              TIL thats a real thing https://github.com/catpuppyapp/PuppyGit

  • kubica ( kubica@fedia.io ) 
    link
    fedilink
    arrow-up
    11
    ·
    1 year ago

    git out --never-come-back

  • 🇰 🌀 🇱 🇦 🇳 🇦 🇰 🇮  ( Kolanaki@pawb.social ) 
    link
    fedilink
    English
    arrow-up
    10
    ·
    1 year ago

    calls suicide hotline to ask for tech support

    • CanadaPlus ( CanadaPlus@lemmy.sdf.org ) 
      link
      fedilink
      arrow-up
      4
      ·
      edit-2
      1 year ago

      Don’t hold your breath, they’re pretty mid at their actual job.

  • Anafabula ( Anafabula@discuss.tchncs.de ) 
    link
    fedilink
    arrow-up
    8
    ·
    1 year ago

    Jujutsu (which is compatible with git) has a nice conflict resolution flow that doesn’t break you workflow.

    Conflicts are encoded into the commits, so that there is never a weird in between state that you have to deal with immediately before being able to do anything else.
    Then you can use Jujutsu’s easier history manipulation to resolve the conflict in the conflicted commits.

    https://steveklabnik.github.io/jujutsu-tutorial/branching-merging-and-conflicts/conflicts.html

    And you could always jj undo if you did something you didn’t want to.

  • peoplebeproblems ( peoplebeproblems@midwest.social ) 
    link
    fedilink
    English
    arrow-up
    7
    ·
    1 year ago

    Been there too OP. Not a good place.

    It’s usually easier to find another job, it will reset your mind, and fear won’t be driving you.

    Or you could just commit what you have, comment “YOLO” and auto resolve conflicts and push.

  • magic_lobster_party ( magic_lobster_party@fedia.io ) 
    link
    fedilink
    arrow-up
    4
    ·
    1 year ago

    Keep your commits small. Merge often. That will reduce the likelihood of terrible merge conflicts.

    If you’re not sharing your work with your team mates for a long time, then you’re setting yourself up for trouble.

    • SpaceCowboy ( SpaceCowboy@lemmy.ca ) 
      link
      fedilink
      arrow-up
      3
      ·
      1 year ago

      Also rebase is usually better than merge.

  • schnurrito ( schnurrito@discuss.tchncs.de ) 
    link
    fedilink
    arrow-up
    3
    ·
    1 year ago

    I remember when similar screenshots circulated for how to tell if i am running jdk or jre, which is even more surprising.

  • invertedspear ( invertedspear@lemmy.zip ) 
    link
    fedilink
    English
    arrow-up
    3
    ·
    1 year ago

    My best friend when I fuck a commit up: https://ohshitgit.com/

    • luciferofastora ( luciferofastora@feddit.org ) 
      link
      fedilink
      arrow-up
      1
      ·
      1 year ago

      I didn’t know about the “revert single file” trick either. The rest is a handy reference too, thanks for sharing!

  • dubyakay ( dubyakay@lemmy.ca ) 
    link
    fedilink
    arrow-up
    3
    ·
    1 year ago

    Google gives you results based on your prior search history.

  • Echo Dot ( echodot@feddit.uk ) 
    link
    fedilink
    arrow-up
    3
    ·
    1 year ago

    See I wasn’t really going to kill myself today, but the thought of dialing that long ass number is just to much.

  • mavu ( mavu@discuss.tchncs.de ) 
    link
    fedilink
    arrow-up
    2
    ·
    1 year ago

    I don’t get why people have such problems with this they even make memes about it.

    Have you people never merged anything by hand or what? It’s really not hard.

    • enbiousenvy ( enbiousenvy@lemmy.blahaj.zone ) 
      link
      fedilink
      English
      arrow-up
      2
      ·
      1 year ago

      it’s maybe more annoying in gamedev. textures, models are binary files that can’t be changed line-by-line.

      • SleeplessCityLights ( SleeplessCityLights@programming.dev ) 
        link
        fedilink
        arrow-up
        1
        ·
        1 year ago

        In game dev, a binary file conflict means someone is going to have to do their work a second time.

    • mere ( mere@lemmy.blahaj.zone ) 
      link
      fedilink
      arrow-up
      2
      ·
      1 year ago

      it’s fine for simple merge conflicts but it quickly gets messy when the two branches are trying to do opposite things to the same code

  • 1984 ( 1984@lemmy.today ) 
    link
    fedilink
    arrow-up
    2
    ·
    1 year ago

    So cool, I havent seen an ad like this in at least a decade. I use something called an ad blocker and also I switched to Kagi, so… :)

  • BCsven ( BCsven@lemmy.ca ) 
    link
    fedilink
    arrow-up
    1
    ·
    1 year ago

    Commit branch…I see your thinking of hanging yourself, here is a link to tying a noose

Programmer Humor@programming.dev

programmer_humor@programming.dev

Subscribe from Remote Instance

Create a post
You are not logged in. However you can subscribe from another Fediverse account, for example Lemmy or Mastodon. To do this, paste the following into the search field of your instance: !programmer_humor@programming.dev

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

  • Keep content in english
  • No advertisements
  • Posts must be related to programming or programmer topics
    • If the mod doesn’t find it funny, you’re banned. Ha-ha!.. For real: do not use the community for “statements”. There are other places for such content. Keep it chill and funny.
Visibility: Public
globe

This community can be federated to other instances and be posted/commented in by their users.

  • 249 users / day
  • 1.84K users / week
  • 3.3K users / month
  • 7.28K users / 6 months
  • 463 local subscribers
  • 33.6K subscribers
  • 1.53K Posts
  • 25.1K Comments
  • Modlog
  • mods:
  • Feyter ( Feyter@programming.dev ) 
  • adr1an ( anzo@programming.dev ) 
  • BurningTurtle ( BurningTurtle@programming.dev ) 
  • Pierre-Yves Lapersonne ( pylapp@programming.dev ) 
  • BE: 0.19.15
  • Modlog
  • Legal
  • Instances
  • Docs
  • Code