top | item 45374449

(no title)

DavidWoof | 5 months ago

> “nobody reads intermediate commit messages one by one on a PR”

I clean my history so that intermediate commits make sense. Nobody reads these messages in a pull request, but when I run git blame on a bug six months later I want the commit message to tell me something other than "stopping for lunch".

> pedantically apply DRY to every situation or forcing others to TDD basic app

Sure, pedantically doing or forcing anything is bad, but in my experience, copy-paste coding with long methods and a lack of good testing is a far more common problem.

You may be 100% correct in your particular case, but in general if senior devs are complaining that your code is sloppy and under-tested, maybe they aren't just being pedantic.

discuss

order

singpolyma3|5 months ago

Yes. I think many people have no culture of good commits, so they never use bisect or blame, so they never see the use of good commits. It's a cycle

krzyk|5 months ago

Good commits are not a requirement form bisect. I commit when I think something more or less completed, or I want to start a major refactoring and I'm afraid I might need to revert it.

I don't always check if commits are buildable, PR should be, because that is what is merged to master and tip of master should be buildable.

m4r71n|5 months ago

I actually find the relevant PR/MR discussion a lot more useful than the commit messages themselves. So any git blame is just to get a commit hash and look that up in GitLab/GitHub to see the entire change set and any comments around it. It makes me wish those comments were bundled with the merge commit somehow and could easily be accessed in the terminal where I'm viewing the git history.

sodapopcan|5 months ago

Not my experience. Often the single commit is all the context I need. If it's not, follow the merge to the ticket number to get more context.

tossandthrow|5 months ago

> Sure, pedantically doing or forcing anything is bad, but in my experience, copy-paste coding with long methods and a lack of good testing is a far more common problem.

This is a false dichotomy and an unproductive thing to focus at.

Experienced engineers know when to make an abstraction and to not. It is based in the knowledge about project.

Abstarct well and don't do compression. Easy said, and good engineers know how to do it.