• magic_lobster_party@kbin.run
    link
    fedilink
    arrow-up
    2
    ·
    2 months ago

    The post mentions that these are for commits in a merge request before squash. When they’re squashed a proper message is given.

    • Serinus@lemmy.world
      link
      fedilink
      arrow-up
      0
      ·
      2 months ago

      Sure, but how much of that is justification and backpedaling?

      If it’s worth a commit, it’s worth a description. “Address vulns” “fix config” “remove files”. It doesn’t take much. Even if it’s just “more address vulns”.

      • magic_lobster_party@kbin.run
        link
        fedilink
        arrow-up
        0
        ·
        2 months ago

        Often I commit because I have to jump to another branch, so I want to save my progress. This means I can be in the middle of something, so I write a trash message.

        All those messages will disappear anyway after the merge request, because we use a squash policy. I can spend more time thinking of a more proper commit message when writing the merge request.

    • lad@programming.dev
      link
      fedilink
      English
      arrow-up
      0
      ·
      2 months ago

      Also, squashing is a pretty bad practice as it is. I can understand that it may make sense sometimes, but most of the time if you don’t commit every other character you input, you’re better off leaving some history of how your code evolved and what changes were coming together

      • magic_lobster_party@kbin.run
        link
        fedilink
        arrow-up
        1
        ·
        2 months ago

        I think squashing is great and I would never want to go back. It helps ensuring:

        • All commits in main have useful messages. No more “fix pipeline errors”, “fix MR comments”, etc.
        • Ensures pipeline has been successful with all commits in main. No need to guess which commits will build and won’t build.
        • Easy to revert commits.
        • Eliminates incompressible history because someone had a bad day with git.
        • Encourages frequent commits. No need to ensure all commits are perfect and good in their own right. Commit when you want to commit even if it’s incomplete work.

        And IMO, if your work warrants multiple commits, then it probably also warrants multiple merge requests. Merge requests should be rather small to make it easier to review.

        Edit: another good thing is that when we decide to release, we can easily look through the commit history for a change log. No more sifting through minor fixes commits.