Hacker News new | ask | show | jobs
by leptons 217 days ago
Git commit messages are nothing to obsess about. If you're worrying about a "messy" git commit history, you're not moving forward, you're stuck in the past, and that indicates bigger problems. The only thing that really matters to me is the state of the code today, not 500 git commits ago. But I don't know what kind of work you do, I just know I don't have time to obsess about anyone's git commits from weeks or months ago. I just know where the code is today, and where I need it to be in the next iteration. Sure, write a basic commit message, but don't waste time on it. And don't obsess about "rebuild" commits or whatever extraneous thing that needs a commit. It isn't going to matter if you're always moving forward.
1 comments

500 commits ago was 10 commits ago at some point in time. And it can be 5 commits ago for part of the code. Imagine looking ar some function and wanting to know why a particular step exists. It’s easy to do a quick blame, then find out it was modified in 2020 to fix some issue. Then quicky scan the message and diff to capture the reasoning behind the change.

That is why good summary and atomic commits are important. They exist in the time dimension.

None of that has ever, in 40 years of programming, been very important to me. Again, the only thing that really matters to me is the state of the code today, and the direction the code needs to go in. Where the code has been simply doesn't matter very much to me (YMMV). Git commit history has had so little value to me in practice that it's almost completely pointless to worry about. But again, YMMV.