Personal Lemmy
  • Communities
  • Create Post
  • Create Community
  • heart
    Support Lemmy
  • search
    Search
  • Login
  • Sign Up
cm0002@lemdro.id to Programmer Humor@programming.devEnglish · 1 year ago

When you screw up git

lemmy.zip

message-square
64
link
fedilink
790

When you screw up git

lemmy.zip

cm0002@lemdro.id to Programmer Humor@programming.devEnglish · 1 year ago
message-square
64
link
fedilink
  • katy ✨@piefed.blahaj.zone
    link
    fedilink
    English
    arrow-up
    26
    ·
    1 year ago
    git reset --hard <commit-hash>  
    git push -f origin main  
    

    i didn’t see anything, officer

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

      You should be forcibly kept away from production systems…

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

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

        • gravitas_deficiency@sh.itjust.works
          link
          fedilink
          English
          arrow-up
          3
          arrow-down
          6
          ·
          1 year ago

          It’s just a branch guard + properly implementing git user and team permission structures - you’re not “configuring a server”

          • marcos@lemmy.world
            link
            fedilink
            arrow-up
            4
            ·
            1 year ago

            I wonder what you think “configuring” means.

      • unalivejoy@lemmy.zip
        link
        fedilink
        arrow-up
        3
        ·
        1 year ago

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

        • 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@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 ✨@piefed.blahaj.zone
            link
            fedilink
            English
            arrow-up
            2
            ·
            1 year ago

            only do that in puppygit (with consent)

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

  • 1.29K users / day
  • 3.16K users / week
  • 7.16K users / month
  • 16K users / 6 months
  • 1 local subscriber
  • 33.6K subscribers
  • 2.56K Posts
  • 98.5K Comments
  • Modlog
  • mods:
  • Feyter@programming.dev
  • adr1an@programming.dev
  • BurningTurtle@programming.dev
  • Pierre-Yves Lapersonne@programming.dev
  • BE: 0.19.20
  • Modlog
  • Instances
  • Docs
  • Code
  • join-lemmy.org