• Quantenteilchen@discuss.tchncs.de
    link
    fedilink
    arrow-up
    4
    ·
    4 hours ago

    I never thought about it and instantly wanted to reply “wait why can’t you do that‽” but now that I thought about it, what would you want the history to look like in that case? A slightly weird rebase? A single commit which seemingly copy pasted the entire other branch with no relation to it left behind?

    • ranzispa@mander.xyz
      link
      fedilink
      arrow-up
      9
      ·
      3 hours ago

      Sometimes you really don’t want to look over the commit history of your colleagues. As long as it’s a small feature, a single commit is a pretty good option.

      Rather than:

      • implemented X
      • forgot this
      • oh, this was not needed
      • now tests actually pass
      • oops
      • fixed this
      • should be ready
      • Elvith Ma'for@feddit.org
        link
        fedilink
        arrow-up
        5
        ·
        2 hours ago

        That’s basically my commit history for every repo where I need the pipeline to run to see if everything works.

        • kungen@feddit.nu
          link
          fedilink
          arrow-up
          2
          ·
          1 hour ago

          Haha same. But that’s why you do it in another branch, and then squash-merge.

    • mcv@lemmy.zip
      link
      fedilink
      arrow-up
      2
      ·
      2 hours ago

      I’m not a fan of changing history in general. Rebase can also he dangerous.

      I think ultimately it’s a matter of scale. Sometimes it can be useful to look into the details of the development of a single feature, but in a large project, that rarely happens. I’m not a fan of squashing, but for large projects, it helps to keep your history manageable.