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
  • 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

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.

  • 403 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