Hacker News new | ask | show | jobs
by jghn 219 days ago
Not all git messages are equal. My $0.02 is that commit messages I write are for other people. Until I officially hand a branch over for other people's consumption, like a PR, if I'm committing the only reason is because I want to access my code on another machine. I'll put whatever junk I please in those commit messages. But then before I open a PR I'll collapse everything down into 1+ commits each with curated content and appropriate messages.
2 comments

> My $0.02 is that commit messages I write are for other people.

I write them for my future self.

In this context we're talking about a side project which presumably won't have a PR where the commit messages are cleaned up (at least I don't do PRs for my own side projects).

If I'm on a branch then I will write junk commits and clean them up before merging to main if I actually manage to get the feature right.

This project shows that git messages aren't just for other people as it's an attempt to make terrible messages usable for the person who wrote the code in the first place.