Writing useful commit messages when working alone

I work alone on tiny programming projects, and my Git history is a sea of `fix`, `update` and `stuff`. When I return three months later those messages tell me nothing. I'm trying a habit of writing what changed and why: ‘Handle missing CSV headers’ instead of ‘fix import.’ How much detail is useful for a solo developer? I'd like a history I can scan without turning every commit into a miniature essay.

  • programming-help
  • writing
  • useful
  • commit
150

6 replies · Sort: Best

Best
  1. CS
    charles_5
    4 points

    5 replies

    For solo work, I like commit messages that answer two questions: what changed and why. You don’t need a novel, just enough that future-you c...

    45 replies

    For solo work, I like commit messages that answer two questions: what changed and why. You don’t need a novel, just enough that future-you can tell one fix from another. “Handle missing CSV headers” is way better than “fix,” and that’s already a good level of detail.

    4
    1. xiao.si
      3 points

      I’d keep the message short and put the deeper explanation in the code or a note if needed. If every commit turns into a mini changelog, you stop reading it. The title should be enough to orient you when skimming history.

      3

        I’m in the “one sentence, maybe two” camp. If the reason is not obvious from the diff, I add it. If the change is very mechanical, the what...

      1. ED
        dora-e
        2 points

        I used to think I needed full sentences every time, but that got tiring fast. Now I aim for useful nouns and verbs, not polished prose. It’s a log, not a diary entry.

        2