Do solo indie devs write commit messages?
I don't do this and don't feel like I am missing much...
I do, but I do it from the perspective that one day I may have to understand this code again and that other people might end up inheriting the project and going through the commit history would be a good start to take over maintenance.
Yes. It's a gift to future you.
Software lifetimes sometimes greatly exceed what you expect. 10 or 15 years down the road, you may look at your code, see something unusual, and want to know when it was put there, why, and whether it is still appropriate. You'll be glad to have a detailed commit history to help decide.
The audience for commit history is different than for release notes. So for example, you might fix a race condition for a specific situation and during debug, notice that there might be another related race condition (but maybe you're not sure it could actually happen). A comment about that in the commit log might be helpful down the road if that other race condition occurs later.
I do it when I have a ‘working’ solution on a feature branch that I’m about to fiddle with. I write something like ‘added x’ and in description of the commit message I write what I want to explore next. This avoids too many ‘sub-feature’ branches and gives context to my future self about the uncommitted changes. Sometimes the last commit contains my brain dump before I close the project. This commit will be undone upon resuming the work.
I've started writing detailed pull requests which detail all the changes.
You can squash commits and their messages into one merge, which could achieve the same result.
But I find creating a branch per feature is really great way to work. Even if it's just you.
I do sometimes when I know that there will be a time (days/weeks) between coding sessions. Git history is an easy way to get back into the my headspace where I left off
At minimum, it's good behavioral practice if someone else down the line needs to see the code. (which will still happen for indie devs, eventually)