• lad@programming.dev
    link
    fedilink
    English
    arrow-up
    3
    ·
    11 days ago

    And here we are, encouraged by our technical leadership to always have a single commit per branch that is constantly amended. I even think squashing the branch is not too good, but this is a step up from that

    • Feyd@programming.dev
      link
      fedilink
      arrow-up
      2
      ·
      10 days ago

      Squashing is good because otherwise you have commits that are unreviewed and broken in your main branch which confounds git bisect, which is largely the only time most people even look at commit history

      • lad@programming.dev
        link
        fedilink
        English
        arrow-up
        2
        ·
        10 days ago

        Largely yes, but also having it squashed requires better commit messages and comments to show what was done for what reason. But yes, bisect is the only reason I’m fine with squashing

        • Feyd@programming.dev
          link
          fedilink
          arrow-up
          1
          ·
          10 days ago

          It seems for some reason you assume people have better discipline for commit messages made in the course of a branch that will be merged, but that’s absolutely not true as a general rule. Additionally, even if the squashed commit message is bad, it will at least correspond to a PR in the forge.

      • lad@programming.dev
        link
        fedilink
        English
        arrow-up
        2
        ·
        11 days ago

        If you mean to ask what that means, it’s that for development you start a branch and either do everything in one commit, or do everything in several, but each time you git commit --amend so that a history is overwritten and in the end it is only one commit still