News for hackers. Stuff that matters.
Re:Git Things by lexicality on Monday January 01, 2024 @07:33AM (#38831397)
No change is minor enough that you don't need to explain what it does.

If the commit message is "fix indentation" then I will ignore it and skip over it while searching the commit history. If it's "minor" or "fix" then I have to open the commit and look to see what it actually is.

These "minor cookies" add up rapidly.

(side note, people that squash important changes together are also on The List)

Re:Git Things by cerved on Monday January 01, 2024 @07:48AM (#38831474)
Let's not forget people that commit trailing whitespace, or different line-endings.

Can we put those on a separate List?

Re:Git Things by Vinnl on Monday January 01, 2024 @08:58AM (#38831795)
To be fair, we've got computers (CI, pre-commit hooks) that can stop that.
Re:Git Things by sgarland on Monday January 01, 2024 @09:15AM (#38831906)
To be pragmatic, the number of times I’ve had to fix or outright create CI for other teams because they didn’t bother to add these basics is too damn high.

For anything with my team (or personal projects), where I can be guaranteed everyone understands exactly what I’ve set up, I add a pre-commit hook to fix minor linting issues and then add the change to the commit. If black, tf fmt, shfmt, etc. can just fix the problem, then do so, and don’t bother asking me if I’m sure.

Re:Git Things by Aeolun on Monday January 01, 2024 @08:21AM (#38831611)
I love the ‘merge commit for my feature branch with 100 commits, but squash for merging release branch to master’ type.

It’s as if a thousand commits cried out in anguish and were suddenly silenced.