• Fonzie!@ttrpg.network
        link
        fedilink
        arrow-up
        3
        ·
        7 hours ago

        I have been that friend from the alt text at every place I have worked. I shudder to think how they’re going about their projects without me, now.

        • Jesus_666@lemmy.world
          link
          fedilink
          arrow-up
          1
          ·
          edit-2
          7 hours ago

          I’m kinda planning on teaching my team how to use interactive rebases to clean the history before a merge request.

          The first thing they’ll learn is to make a temporary second branch so they can just toss their borked one if they screw up. I’m not going to deal with their git issues for them.

    • expr@programming.dev
      link
      fedilink
      arrow-up
      17
      ·
      10 hours ago

      Never understood why this is such a trope. There’s very little you can’t recover in git (basically, only changes you never committed in the first place).

        • expr@programming.dev
          link
          fedilink
          arrow-up
          23
          ·
          10 hours ago

          Not sure if serious or not, but yeah I use interactive rebases every day, many times a day (it’s nice for keeping a clean, logical history of atomic changes).

          It’s very simple to recover if you accidentally do something you don’t intend (git rebase --abort if the rebase is still active, git reflog to find the commit before the rebase if it’s finished).

  • NigelFrobisher
    link
    fedilink
    arrow-up
    3
    ·
    7 hours ago

    Branching version control was definitely a “they have played us for absolute fools” moment. Especially after all our projects ended up as isolated branches on isolated microservice repositories so basically none of our code was being integrated, let alone continuously. Good for full-remote open source projects where a central admin team has to police submissions though.

  • LemoineFairclough@sh.itjust.works
    link
    fedilink
    English
    arrow-up
    5
    ·
    8 hours ago

    Doesn’t git status tell you what to do?

    use “git add <file>…” to mark resolution

    use “git commit” to conclude merge

    I always use git status to check what is appropriate before doing anything else, since the right thing to do can sometimes be different, like after using git rebase when a break command was used vs when a squash command resulted in a conflict.

    • Oinks@lemmy.blahaj.zone
      link
      fedilink
      arrow-up
      2
      ·
      6 hours ago

      To be fair that’s not the entire story, since you need to actually resolve the conflicts first, which is slightly scary since your worktree will be broken while you do it and your Linter will be shouting at you.

      You may also want a dedicated merge tool that warns you before accidentally commiting a conflict and creating a broken commit.

      Oh and non trivial resolutions may or may not create an evil merge which may or may not be desirable depending on which subset of git automation features you use.

      Using git status often is definitely good advice though.

  • tyler@programming.dev
    link
    fedilink
    arrow-up
    13
    ·
    11 hours ago

    I actually feel disgusted when I see Google search now. It’s just so bad that even the logo does it.

  • _____@lemm.ee
    link
    fedilink
    English
    arrow-up
    8
    ·
    11 hours ago

    I will say. if you have no idea at least clone your branch so you can experiment on it.

  • exu@feditown.com
    link
    fedilink
    English
    arrow-up
    2
    arrow-down
    1
    ·
    8 hours ago

    Praise be Magit, which actually allows me to handle stuff like that moderately confidently.