• TechNom (nobody)@programming.dev
    link
    fedilink
    English
    arrow-up
    3
    arrow-down
    1
    ·
    10 months ago

    The proper way to organize a branch is as a logical sequence of sub-features - each represented by a commit. Ideally, the commits should not break the build while introducing its feature. In many such cases, each commit may have a back story - the tests you did, your decision process, online references (that apply only to that commit - something like stackoverflow answers), etc.

    Branch messages don’t have the fidelity to capture such information. You may question the need for such detailed info. However, along with git blame and bisect, those commit messages are invaluable. I have lost count of how many times my own detailed commit messages helped me. And while I don’t usually look at others’ commits in such detail, I do read the details of commits that I’m interested in.

    Git (and other VCSs) isn’t just a snapshot tool. It’s a history tool with the ability to capture history documentation. Honestly, Git is extremely underutilized in that capacity.