Skip Navigation
45 comments
  • When I eventually (usually) rebase, declarative statements of what the commit would accomplish if applied.

    When I am testing CICD or generally need to push more frequently for whatever reason, it's humor and angst all the way.

    Ffffffuuuuuuuuu

    Pls, why

    Okay yeah that was important I guess.

    (⁠╯⁠°⁠□⁠°⁠)⁠╯⁠︵⁠ ⁠┻⁠━⁠┻

    • "progress on [1], fixed linting [2]"
    • "[1] completed, setup for [2]"
    • "[3] and [4] completed"
    • "fixed formatting"
    • "refactoring [1] and [2]"
    • "fix variable typos"
    • "update logic in [2]"
    • "revert package.json and regenerate package-lock"

    All my commits have comments. I generally commit after completing a 'block' objective, a describe what that was but in very simple terms mostly in regards to the file/section with the most significant logic changes. I don't always specify the file if I did tiny typos/linting/annotation across a bunch of them, because the logic is unaffected I know that the differences will be visible in the commit history.

    My weakness is that I don't do it often enough. If I'm working on [2] for several hours, I'll only commit when I consider it minimally-viable (completed 2), or when moving between machines ([further] progress on 2). And I have a bad habit of not pushing every time I commit, just at the end of the day or when moving between machines (though a messy rebase hopefully made that lesson stick), or if somebody else on the team wants to review an issue I'm having.

  • I try to follow the BLUF pattern: Bottom line up front. The first line is as short a description of the change ("Re-fixed a bug where a URL without a verb could crash the bot.") with some detail following ("I thought I caught that a couple of years back...")

    I try to save the detail for the code itself: Comments describe what I was thinking at the time for context, the code is the code. I don't replicate the code comments in the commit message because having the same thing in two places means having to keep two things up to date, and that rarely goes well.

  • Like the default Merge messages that git creates.

    "Add some new feature" "Fix this and that" "Refactor XY code"

    Not "Adding", "fixed", "Refactors" or anything...

  • I try to follow https://www.conventionalcommits.org/en/v1.0.0/

    For me, the need it: when production is on fire, as a responsible person, I want to be able to understand why the change of this commit has been made. Perhaps also what were the drivers of the implementation.

    I also have this onliner to commit and push each 10min:

     undefined
        
    watch -n 60 'git add . ; git commit --allow-empty-message -m ""  ; git push'
    
      

    But those commits would never be merge as they are to master or main. It's just if I loose work on my laptop. Worst case a git rebase HEAD~ has to be done before the PR review.

  • [issue number] short summary

    description of main changes, bullet list if there are lots.

    description of minor changes.

    motivation of this change, if unclear.

45 comments