‹ BackHN Continuity

Thread

Commit description as a thinking tool

130 points · 78 comments · yedhukrishnan

  1. zahrevsky · · focus · HN ↗
    I sometimes struggle to decide whether to put an explanation in a commit message, in the docs (say in an ADR). I tend to save everything as docs because files are a more “universal” interface, so to speak. They’re in plain sight and harder to miss.

    I guess the main advantages of Git history are that it’s (1) uneditable and (2) directly linked to a specific commit.

    1. mopsi · · focus · HN ↗
      There's an additional aspect: whoever ends up reading the messages later might not even be aware that there is more information somewhere else.

      That's why I prefer to keep any important information as close as possible, either in the commit message or as a comment in the source code, to make sure it's unmissable to anyone working on it later.

Open on Hacker News to reply ↗

Unofficial Hacker News client; not affiliated with Y Combinator.