‹ BackHN Continuity

Thread

Commit description as a thinking tool

130 points · 78 comments · yedhukrishnan

  1. kccqzy · · focus · HN ↗
    Long ago I changed the default commit message to include headers “Why?” and “How?” to remind myself that I need to explain why a change is made (what this article focuses on), and how it is made (different implementation approaches considered). I followed this format for a long time. I was in the top 1% for commit message length at the company.

    Tangent: I once worried about things breaking when commit messages got too long. I tried really long commit messages and nothing broke: <a href="https:&#x2F;&#x2F;github.com&#x2F;kccqzy&#x2F;long-commit-messages&#x2F;commit&#x2F;ccfda400ebe0248ca4a37d1a087507c7dd455a3b" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;kccqzy&#x2F;long-commit-messages&#x2F;commit&#x2F;ccfda4...

    1. cerved · · focus · HN ↗
      I like the Git rule of thumb. If it&#x27;s too long -- it&#x27;s probably not a single commit.
Open on Hacker News to reply ↗

Unofficial Hacker News client; not affiliated with Y Combinator.