phase,
@phase@lemmy.8th.world avatar

I try to follow 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:


<span style="color:#323232;">watch -n 60 'git add . ; git commit --allow-empty-message -m ""  ; git push'
</span>

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.

Double_A,
@Double_A@discuss.tchncs.de avatar

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…

raubarno,

Looking at the log of my solo project, I could say the formula of my commit message is Verb the Subject, the Verb being Added/Tweaked/Removed, etc., and the subject of what is being changed. As I’m using git commit -m ‘Message’ GNU Bash every time (none of the clients tend to work well for me + git self-hosting practice over SSH), I just try to make one-liners and without entering an external editor.

Although my professional experience is scarce. For most of the time, I’ve been creating but not maintaining my projects. My projects do not have a decent high-level structure, I do not test my codebase, I learn my code by heart and follow intuition. I tend to think in algorithms, rather than structural design patterns. Even for my newest project, the main.rs is bloated, the functions are not in the correct modules (a.k.a. files), the modules are improperly named. Alhough, I cannot believe in myself I am approaching 3.5K lines of code (separated over two repositories) but I can still navigate…

millie,

Literally about 90% of the commits I’ve pushed on my DayZ server’s configs and mod files are just marked ‘a’. The actual mod updates I almost never have made porch notes for. Trying to be a little more informative for my new D&D based Conan Exiles server.

It still looks better than how I used to name things in flash.

lucas,

deleted_by_author

  • Loading...
  • CanadianNomad,

    I feel like this might be a good case for LLMs… Auto git commit suggestions based on the diff.

    lucas,

    deleted_by_author

  • Loading...
  • CanadianNomad,

    If it does, I haven’t seen it… I’d be happy to test drive it.

    tvbusy,

    There are already some attempts but I don’t think it will work, harmful even. Best case scenario, the AI can understand the code as well as a senior engineer from another company. All they can know without the context is what was changed, which is useless. We need the reason why the commit was made, not what was changed. The info is not there in the first place for the AI to try to extract.

    beretis,

    @CanadianNomad @lucas Awesome idea, yeah I can totally see that working well :)

    drwho,
    @drwho@beehaw.org avatar

    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.

    MJBrune,

    I did this thing that fixed ticket

    For features:

    I did this thing and X feature is now implemented. This closes out work for

    Solaris1789,
    @Solaris1789@jlai.lu avatar

    I try (my best) to follow www.conventionalcommits.org/en/v1.0.0/

    lencioni,

    I always try to capture the reasoning behind why I am making the change. I wrote about this more here …medium.com/the-secrets-to-great-commit-messages-…

    dark_stang,
    @dark_stang@beehaw.org avatar

    They fluxuate wildly between short and informative messages like “fixed regex validation on property A” and “I fucking hate prettier” when the build pipeline fails because I had a line that was 2 characters too long.

    Luvon,

    On projects I setup I have prettier run as part of a commit hook. All files will be formatted at all times

    platysalty,

    I've had commits called fuck

    Manticore,
    @Manticore@beehaw.org avatar
    • “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.

    Elw,

    [JIRA-123] Quick summary of objective

    Justification (if applicable) Bulleted, high-level overview of important bits Any relevant test results done that won’t also be done in CI

    hal_canary,

    [issue number] short summary

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

    description of minor changes.

    motivation of this change, if unclear.

    majkeli,
    majkeli avatar

    Developer Initials - Jira ticket number which includes the project abbreviation and the ticket number - brief description:

    DA - HHGTTG-42 - fix question answer format

    If you need details you look in the ticket.

    ramplay,

    Developer intials seems a tad redundant since the commit is tied to author(s). But I guess it is only 2 extra char

  • All
  • Subscribed
  • Moderated
  • Favorites
  • programming@beehaw.org
  • ethstaker
  • DreamBathrooms
  • InstantRegret
  • magazineikmin
  • ngwrru68w68
  • cubers
  • thenastyranch
  • Youngstown
  • rosin
  • slotface
  • cisconetworking
  • mdbf
  • kavyap
  • Durango
  • megavids
  • khanakhh
  • GTA5RPClips
  • anitta
  • osvaldo12
  • everett
  • normalnudes
  • tester
  • tacticalgear
  • provamag3
  • modclub
  • Leos
  • JUstTest
  • lostlight
  • All magazines