• kisor
    link
    fedilink
    English
    arrow-up
    2
    ·
    1 year ago

    committing to a commit message standard (see: https://cbea.ms/git-commit/)

    I am almost giving up on this except for personal projects. I still use this as much as possible even in work projects. But most enterprise clients even the ones from US and UK don’t seem to care about this anymore.

    • spartanatreyu
      link
      fedilink
      English
      arrow-up
      3
      ·
      1 year ago

      It’s easy to mandate, the server has a githook that disallows any push that contains a commit that doesn’t follow the standard.

      Anyone who makes a bunch of commits on their end, then tries to push them will see an error message returned by the server pointing them to the standard. They then just have to rename their commits through an interactive rebase and repush. Interactive rebase is stupidly easy with most git-guis and easy enough for terminal users who have forgotten the commands through a 30 second youtube short.

      • kisor
        link
        fedilink
        English
        arrow-up
        2
        ·
        1 year ago

        I would love to do this and I will explore this.

        What I have most issue with is the imperative mood — So many devs (in one case a very well-spoken EM), just say Added so and so changes instead of Add so and so changes.

        I would like to know if this type of thing can be detected in a githook. What I usually do is educate the team I lead, but it all breaks/becomes harder when we either join another team for a duration or some other teams’ senior devs join our team(s).

        • spartanatreyu
          link
          fedilink
          English
          arrow-up
          3
          ·
          1 year ago

          It’s pretty hard to teach what imperative mood is.

          English is hard to lint, but not impossible. See the Vale linter (not to be confused with the vale language)

          • kisor
            link
            fedilink
            English
            arrow-up
            4
            ·
            1 year ago

            I would love to annoy some people with this. But seriously, thank you for the recommendation. This is incredible.