Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Isn't "one commit per independent change" common advice in git tutorials? Each file can be changed independently of any other, so taken literally, exactly how you're supposed to do it.


That's wildly incorrect. "One commit per logical change" would mean that every single file modified in this way should have been in a single commit. By your logic, you could never have two files changes in the same commit.


> you could never have two files changes in the same commit.

We're going OT here, but i don't think that applies to C, where a "logical change" to a function definition may be split over two files (.c/.h).


In the kernel, the proper practice for sweeping changes like this is one commit per subsystem.




Consider applying for YC's Summer 2026 batch! Applications are open till May 4

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: